OpcUaCanOpen
CANopen OPC-UA server
CanSDOItem.h
Go to the documentation of this file.
1 #ifndef __CANSDOITEM_H__
2 #define __CANSDOITEM_H__
3 
4 #include <opcua_basedatavariabletype.h>
5 #include "CanBusAccess.h"
6 
7 #include "CanOpenItem.h"
8 #include "CanSDOObject.h"
9 
10 namespace CanOpen
11 {
12  class CanSDOObject;
17  class CanSDOItem : public CanOpenItem
18  {
19  public:
21  SDOITEM_TYPE1 *conf,UaNode *blink,int code);
23  SDOITEM_TYPE2 *conf,UaNode *blink,int code);
25  SDOITEM_TYPE3 *conf,UaNode *blink,int code);
26 
27 
28  virtual UaVariant UnPack();
29  virtual UaStatus pack(const OpcUa_Variant *);
30  virtual UaStatus write(UaDataValue &udv);
31  virtual UaStatus read();
32 
33  virtual ~CanSDOItem(void)
34  {
35  } ;
36 
37  virtual UaStatus connectCode(OpcUa_UInt32 code, ::xsd::cxx::tree::type *conf, UaNode *blink);
38  virtual UaVariant getPropertyValue(OpcUa_UInt32 code, ::xsd::cxx::tree::type *conf);
39 
40 
41  OpcUa_Byte getSubIndex()
42  {
43  return m_subind;
44  }
45 
47  CanSDOObject * in = static_cast<CanSDOObject *>(getParentDevice());
48  return in;
49  }
50  OpcUa_UInt32 getTimeout() {return m_Timeout; }
51  protected:
52  OpcUa_Byte m_subind;
53  OpcUa_UInt32 m_Timeout;
54  };
55 }
56 #endif
57