IoT::CANopen

template < typename T >

class VarObject

File Information

Library: IoT/CANopen
Package: CANopen
Header: IoT/CANopen/Object.h

Description

A generic class for scalar objects that works with all integer types, bool, as well as float, double and std::string (via specialization).

Inheritance

Direct Base Classes: Object

All Base Classes: Object, Poco::RefCountedObject

Member Summary

Member Functions: access, code, get, max, min, read, set, type, write

Inherited Functions: access, code, copy, duplicate, read, referenceCount, release, structure, type, write, writeImpl

Types

Ptr

typedef Poco::AutoPtr < VarObject > Ptr;

Type

typedef T Type;

Constructors

VarObject inline

VarObject();

VarObject inline

VarObject(
    T value,
    Object::Access access = OBJ_ACCESS_RW
);

VarObject inline

VarObject(
    T value,
    T min,
    T max,
    Object::Access access = OBJ_ACCESS_RW
);

Destructor

~VarObject virtual inline

~VarObject();

Member Functions

access virtual inline

Access access() const;

code inline

Object::ObjectCode code() const;

get inline

T get() const;

max inline

T max() const;

min inline

T min() const;

read virtual inline

SDO::AbortCode read(
    Poco::UInt8 subIndex,
    std::vector < char > & data
) const;

set inline

void set(
    T value
);

type virtual inline

Poco::UInt16 type() const;

write virtual inline

SDO::AbortCode write(
    Poco::UInt8 subIndex,
    std::size_t size,
    const char * data
);

Securely control IoT edge devices from anywhere   Connect a Device