OpcUaCanOpen
CANopen OPC-UA server
CanSDOObject.h
Go to the documentation of this file.
1
#ifndef __CANSDOOBJECT_H__
2
#define __CANSDOOBJECT_H__
3
#pragma once;
4
#include "uaobjecttypes.h"
5
#include "
CanOpenObject.h
"
6
#include "uasemaphore.h"
7
#include "
CanOpenData.h
"
8
9
namespace
CanOpen
10
{
11
class
CanSDOItem;
12
class
CanNodeObject;
13
17
class
CanSDOObject
:
18
public
CanOpenObject
19
{
20
public
:
21
CanSDOObject
(
pUserDeviceStruct
*par,
22
SDO
*
conf
,UaNode *blink,
int
code);
23
/*
24
CanSDOObject(InterfaceUserDataBase *par,
25
SDOITEM_TYPE2 *conf,UaNode *blink,int code);
26
*/
27
virtual
~CanSDOObject
(
void
);
28
29
virtual
UaStatus
getDeviceMessage
(OpcUa_UInt32 code) ;
30
virtual
UaStatus
sendDeviceMessage
(OpcUa_UInt32 code, UaDataValue *
value
= 0) ;
31
virtual
void
pass
(
const
CanMsgStruct
*);
32
38
virtual
UaStatus
connectCode
(OpcUa_UInt32 code,::
xsd::cxx::tree::type
*
conf
,UaNode *blink);
39
virtual
UaVariant
getPropertyValue
(OpcUa_UInt32 code, ::
xsd::cxx::tree::type
*
conf
);
40
41
virtual
bool
isMsgForObject
(
const
CanMsgStruct
*);
42
43
virtual
UaStatus
readSdo
(UaDataValue&);
44
virtual
UaStatus
writeSdo
(UaDataValue &udv);
45
OpcUa_BuiltInType
getItemType
();
46
UaDateTime&
getLastTimeStamp
() {
return
m_udt
; }
47
OpcUa_Byte
getSubIndex
();
48
OpcUa_UInt16
getIndex
() {
return
m_ind
; }
49
void
setIndex
(OpcUa_UInt16 ind) {
m_ind
=ind; }
50
CanSDOItem
*
getSDOItem
() {
return
m_pSDOItem
; }
51
OpcUa_UInt32
m_iLength
;
52
UaByteArray
m_segSdoBuffer
;
53
void
setSDOItem
(
CanSDOItem
*csdo) ;
54
void
freeSDOItem
() ;
55
void
setTimeout
(OpcUa_UInt32
t
) {
m_iTimeout
=
t
; }
56
57
private
:
58
CanSDOItem
*
m_pSDOItem
;
59
OpcUa_UInt16
m_ind
;
60
};
61
}
62
#endif
CanOpen
include
CanSDOObject.h
Generated on Fri Sep 11 2020 14:29:51 for OpcUaCanOpen by
1.8.14