Tango::DEV_CHAR is missing
|
|
---|---|
I'm trying to find unsigned char type for the argument type. There's nothing like DEV_CHAR. I can find DEV_UCHAR, though. Please somebody explains why this type is missing? I'm trying to do something like
|
|
|
---|---|
This type is not supported, I cannot really give a strong reason for that. It is of little usage since you will never receive any event with this type, you have just to skip this case in your statement.
Cheers
Jean-Michel |
|
|
---|---|
I think the reason is that DEV_CHAR is a subset of DEV_UCHAR. DEV_UCHAR is a string of bytes of known length (array of bytes) while DEV_CHAR is a string of bytes terminated by a null character (a string). Therefore DEV_CHAR can be passed via DEV_UCHAR. Andy |
|
|
---|---|
Actually what I want is not parsing the event. What I want is filling the protocol frame passed by CORBA::Any value.
|
|
|
---|---|
I'm looking forward to know in which context you need to do that. Just curious, what 'pDataPtr' is supposed to be used for? |
|
|
---|---|
I correct my previous post - I thought you were referring to arrays of char but in fact you were referring to a single char. I also do not know why we have not defined DevChar. Maybe there is a reason but I don't know it … |
|
|
---|---|
nleclercq I was trying to change my original code using Tanggo::CmdArgType. The original code was
Jean-Michel As Jean-Michel said, this type is not useful in real fields. This question is just from my curiosity |
|
|
---|---|
I thought using tango DeviceAttribute is only for my own internal purpose. But when I see one of the devices called ModbusComposer under Calculation, I found similar switch/case samples like below; In my opinion, the initial designers do not see any necessity for the DEV_CHAR.But it is still not clear why DEV_USHORT and DEV_SHORT, or DEV_LONG and DEV_ULONG then. BTW, somebody let me know how to post code lines. They looks ugly not supporting indent chars(such as tab char). |
|
|
---|---|
naverThere's a "code" icon the message editor tool bar.
|