File Information
Library: IoT/CANopen
Package: CANopen
Header: IoT/CANopen/ObjectDictionary.h
Description
This class implements the CANopen Object Dictionary.
After creation of the ObjectDictionary, it should be filled with objects first. After all objects have been added, the ObjectDictionary can be attached to a SDO and a MPDO to automatically handle SDO and MPDO requests.
Member Summary
Member Functions: attachToMPDO, attachToSDO, detachFromMPDO, detachFromSDO, erase, get, onMPDOReceived, onSDODownloadCompleted, onSDODownloadInitiated, onSDOUpload, set
Constructors
ObjectDictionary
Creates an empty ObjectDictionary.
Destructor
~ObjectDictionary
~ObjectDictionary();
Destroys the ObjectDictionary.
Member Functions
attachToMPDO
void attachToMPDO(
MPDO & mpdo
);
Attaches the ObjectDictionary to the given MPDO to handle MPDO messages.
attachToSDO
void attachToSDO(
SDO & sdo
);
Attaches the ObjectDictionary to the given SDO to handle SDO uploads and downloads.
detachFromMPDO
void detachFromMPDO();
Detaches the ObjectDictionary from the MPDO.
detachFromSDO
void detachFromSDO();
Detaches the ObjectDictionary from the SDO.
erase
void erase(
Poco::UInt16 index
);
Removes the object at the given index.
get
Object::Ptr get(
Poco::UInt16 index
) const;
Returns the object at the given index, or a null pointer of no object exists at that index.
set
void set(
Poco::UInt16 index,
Object::Ptr pObject
);
Sets the object at the given index.
onMPDOReceived
void onMPDOReceived(
const MPDO::MPDOTransfer & xfer
);
onSDODownloadCompleted
void onSDODownloadCompleted(
SDO::SDOTransfer & xfer
);
onSDODownloadInitiated
void onSDODownloadInitiated(
SDO::SDOTransfer & xfer
);
onSDOUpload
void onSDOUpload(
SDO::SDOTransfer & xfer
);