OpcUaCanOpen
CANopen OPC-UA server
Emergency.h
Go to the documentation of this file.
1 #ifndef __EMERGENCY_H__
2 #define __EMERGENCY_H__
3 
4 #include "uavariant.h"
5 #include "CanObject.h"
6 #include "CANOpenServerConfig.h"
7 #include "CANopen.h"
8 #include "CanBusAccess.h"
9 #include "UaCanTrace.h"
10 
11 namespace CanOpen
12 {
13 
16  class Emergency :
17  public CanObject
18  {
19  public:
20 
27  Emergency(pUserDeviceStruct *interf, NODE *ca, UaNode *blink, OpcUa_UInt32 code) :
28  CanObject(interf, ca, blink, code) {};
29 
31  virtual ~Emergency(void) {};
32 
37  virtual UaStatus getDeviceMessage(OpcUa_UInt32 code)
38  {
39  OpcUa_ReferenceParameter(code);
40  return OpcUa_Good;
41  }
42  virtual UaStatus sendDeviceMessage(OpcUa_UInt32 code, UaDataValue *value = 0)
43  {
44  OpcUa_ReferenceParameter(code);
45  OpcUa_ReferenceParameter(value);
46  return OpcUa_Good;
47  }
48 
49 
55  virtual UaStatus connectCode(OpcUa_UInt32 code, ::xsd::cxx::tree::type *conf, UaNode *blink)
56  {
57  CanObject * cno = static_cast<CanObject *>(getParentDevice());
58  UaStatus ret = cno->connectCode(code, conf, blink);
59  return ret;
60  }
61  virtual UaVariant getPropertyValue(OpcUa_UInt32 code, ::xsd::cxx::tree::type *conf)
62  {
63  CanObject * cno = static_cast<CanObject *>(getParentDevice());
64  return cno->getPropertyValue(code,conf );
65  }
66 
67  };
68 }
69 #endif