13 #ifndef FAUDES_IOP_D3RIP_URT_H
14 #define FAUDES_IOP_D3RIP_URT_H
21 #ifdef FAUDES_IODEVICE_D3RIP_URT
35 #define D3RIP_RT_MESSAGE_MAX_LENGTH 186
36 #define D3RIP_URT_MAX_PARAMETERS_COUNT 5
37 #define D3RIP_URT_MAX_EVENT_COUNT 5
41 D3RIP_URT_CHANNEL_TO_TRANSMIT,
42 D3RIP_URT_PARAMETER_COUNT,
47 D3RIP_URT_DESTIONATION_NODE=0,
48 D3RIP_URT_DESTIONATION_CHANNEL,
49 D3RIP_URT_ELIGIBILITY_TIME,
50 D3RIP_URT_DEADLINE_TIME,
51 D3RIP_URT_PARAMETER_SIZE
56 int destinationChannel;
69 class AttributeD3ripURTOutput :
public AttributeVoid {
76 AttributeD3ripURTOutput(
void) : AttributeVoid() {};
79 AttributeD3ripURTOutput(
const AttributeD3ripURTOutput& rOtherAttr) : AttributeVoid()
80 { DoAssign(rOtherAttr); };
83 virtual bool IsDefault(
void)
const {
return false;};
86 virtual void Clear(
void) {
91 int mChannelToTransmit;
97 std::vector<ParameterRecord> mParameterRecords;
109 void DoAssign(
const AttributeD3ripURTOutput& rSrcAttr);
129 virtual void DoRead(TokenReader& rTr,
const std::string& rLabel=
"",
const Type* pContext=0);
147 virtual void DoWrite(TokenWriter& rTw,
const std::string& rLabel=
"",
const Type* pContext=0)
const;
165 class AttributeD3ripURTInput :
public AttributeVoid {
172 AttributeD3ripURTInput(
void) : AttributeVoid() {};
175 AttributeD3ripURTInput (
const AttributeD3ripURTInput& rOtherAttr) : AttributeVoid()
176 { DoAssign(rOtherAttr); };
179 virtual bool IsDefault(
void)
const {
return false;};
182 virtual void Clear(
void) { ;};
197 void DoAssign(
const AttributeD3ripURTInput& rSrcAttr);
217 virtual void DoRead(TokenReader& rTr,
const std::string& rLabel=
"",
const Type* pContext=0);
237 virtual void DoWrite(TokenWriter& rTw,
const std::string& rLabel=
"",
const Type* pContext=0)
const;
252 class AttributeD3ripURTEvent :
public AttributeDeviceEvent {
259 AttributeD3ripURTEvent(
void);
262 AttributeD3ripURTEvent(
const AttributeD3ripURTEvent& rOtherAttr);
265 virtual bool IsDefault(
void)
const {
return false;};
271 const AttributeD3ripURTOutput* Outputp(
void)
const {
272 return static_cast<AttributeD3ripURTOutput*
>(mpOutputAttribute); };
275 const AttributeD3ripURTInput* Inputp(
void)
const {
276 return static_cast<AttributeD3ripURTInput*
>(mpInputAttribute); };
281 void DoAssign(
const AttributeD3ripURTEvent& rSrc)
285 static const AttributeD3ripURTInput* InputPrototypep(
void);
288 static const AttributeD3ripURTOutput* OutputPrototypep(
void);
357 class d3ripURTDevice :
public vDevice {
360 friend void* DoListenCLModule(
void*);
372 unsigned char mEventParameters[D3RIP_URT_MAX_EVENT_COUNT][D3RIP_URT_HEADER_SIZE+D3RIP_URT_PARAMETER_SIZE*D3RIP_URT_MAX_PARAMETERS_COUNT];
375 int mContinueListening;
381 mqd_t mMQueueToReceive;
384 pthread_t mThreadListenModule;
387 unsigned char mCommunicationRequestCount;
390 ParameterRecord mCommunicationRequests[D3RIP_URT_MAX_EVENT_COUNT*D3RIP_URT_MAX_PARAMETERS_COUNT];
393 unsigned char mEventCount;
396 unsigned char mEventsToSendCount;
399 unsigned char mEventIdsToSend[D3RIP_URT_MAX_EVENT_COUNT];
402 std::map<std::string, int> mEventIdMap;
407 d3ripURTDevice(
void);
412 d3ripURTDevice(
const d3ripURTDevice& rSrc) : vDevice()
418 virtual ~d3ripURTDevice(
void);
425 virtual void Clear(
void);
432 virtual void Compile(
void);
443 virtual void Start(
void);
448 virtual void Stop(
void);
451 virtual void Reset(
void);
460 virtual void WriteOutput(
Idx output);
468 void FlushOutput(
unsigned char channel);
473 TaNameSet<AttributeD3ripURTEvent>* pConfiguration;
493 void DoWritePreface(TokenWriter& rTw,
const std::string& rLabel,
const Type* pContext=0)
const;
512 virtual void DoReadPreface(TokenReader& rTr,
const std::string& rLabel=
"",
const Type* pContext=0);
515 void DoAssign(
const d3ripURTDevice& rSrcAttr){};
516 virtual bool DoEqual(
const d3ripURTDevice& rSrcAttr)
const {
return false;};
522 void* DoListenCLModule(
void* pD3ripURTDevice);
#define FAUDES_TYPE_DECLARATION(ftype, ctype, cbase)
faudes type declaration macro
virtual void Clear(void)
Clear.
void DoAssign(const AttributeDeviceEvent &rSrcAttr)
Assignment.
Includes all libFAUDES headers, no plugins.
Virtual device for interface definition
libFAUDES resides within the namespace faudes.
uint32_t Idx
Type definition for index type (allways 32bit)