Commit fc0478f2 authored by Thomas BOUTROUE's avatar Thomas BOUTROUE

Add LSS commands to CanOpen integration

parent 154d88b9
......@@ -182,6 +182,13 @@ void CanOpen::sendNmtChangeRequest (const int nodeId, const CanOpenNmtCmd::Type
void CanOpen::sendLssActionRequest (const CanOpenLssCommands::Type cmd, const int argument) {
if (m_canOpenMan) {
m_canOpenMan->sendLssCommand (CanOpenLssCmd (cmd),
quint8 (argument));
void CanOpen::sendSdoReadRequest (const int nodeId, const int index, const int subIndex, const bool blockMode) {
if (m_canOpenMan) {
m_canOpenMan->sendSdoReadRequest (CanOpenNodeId (nodeId),
......@@ -18,6 +18,13 @@ QML_ENUM_CLASS (CanOpenNmtCmd,
ResetComm = 0x82,
QML_ENUM_CLASS (CanOpenLssCommands,
SwitchState = 0x04,
ChangeNodeId = 0x11,
ChangeBitrate = 0x13,
StoreConfig = 0x17,
class CanBus;
class ByteArrayWrapper;
class CanOpenObjDict;
......@@ -59,6 +66,8 @@ public:
Q_INVOKABLE void sendNmtChangeRequest (const int nodeId, const CanOpenNmtCmd::Type state);
Q_INVOKABLE void sendLssActionRequest (const CanOpenLssCommands::Type cmd, const int argument = 0);
Q_INVOKABLE void sendSdoReadRequest (const int nodeId, const int index, const int subIndex, const bool blockMode = false);
Q_INVOKABLE void sendSdoWriteRequest (const int nodeId, const int index, const int subIndex, ByteArrayWrapper * buffer);
......@@ -99,6 +99,7 @@ void SharedObject::registerQmlTypes (QQmlEngine * qmlEngine) {
qmlRegisterUncreatableType<Borders> (uri, maj, min, "Borders", msg);
qmlRegisterUncreatableType<CanOpenNmtCmd> (uri, maj, min, "CanOpenNmtCmd", msg);
qmlRegisterUncreatableType<CanOpenNmtState> (uri, maj, min, "CanOpenNmtState", msg);
qmlRegisterUncreatableType<CanOpenLssCommands> (uri, maj, min, "CanOpenLssCmd", msg);
qmlRegisterUncreatableType<VarTypes> (uri, maj, min, "VarTypes", msg);
// must not be instanciated in QML helpers
qmlRegisterUncreatableType<CanDataWrapperRx> (uri, maj, min, "CanDataWrapperRx", msg);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment