46 class CVendorDescriptor;
47 class CNamespaceDescriptor;
48 class CTypeDescriptor;
49 class CFieldDescriptor;
50 struct SEnumTableEntry;
106 unsigned int nValue);
149 unsigned int nValue);
192 unsigned int nValue);
235 unsigned int nValue);
278 unsigned int nValue);
321 unsigned int nValue);
364 unsigned int nValue);
407 unsigned int nValue);
493 unsigned int nValue);
536 unsigned int nValue);
675 const char * pWhatStr);
783 (*m_pfConstruct)(void);
812 FT_U8, FT_S8, FT_U8V, FT_S8V,
813 FT_U16, FT_S16, FT_U16V, FT_S16V,
814 FT_U32, FT_S32, FT_U32V, FT_S32V,
815 FT_U64, FT_S64, FT_U64V, FT_S64V,
817 FT_U1, FT_U1V, FT_U2, FT_U96,
820 FT_E1, FT_E2, FT_E8, FT_E16, FT_E32,
866 struct SEnumTableEntry
908 unsigned int MessageTypeNum)
const;
913 unsigned int ParameterTypeNum)
const;
918 unsigned int VendorID,
919 unsigned int MessageSubTypeNum)
const;
924 unsigned int VendorID,
925 unsigned int ParameterSubTypeNum)
const;
936 typedef std::list<CParameter *> tListOfParameters;
1018 tListOfParameters * pParameterList);
1028 int nMaxDepth)
const;
1098 llrp_u32_t MessageID)
1100 m_MessageID = MessageID;
1113 llrp_u32_t m_MessageID;
1411 unsigned int nBits) = 0;
1477 const tListOfParameters * pParameterList,
1486 const tListOfParameters * pParameterList,
1772 unsigned int nBits) = 0;
llrp_bytesToEnd_t & operator=(const llrp_bytesToEnd_t &rValue)
Assignement operator. Used to copy an existing instance.
virtual llrp_s16v_t get_s16v(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u16v_t into the specified field descriptor.
const CTypeDescriptor * lookupMessage(unsigned int MessageTypeNum) const
Lookup a standard message type descriptor. NULL=>not found.
llrp_u16v_t & operator=(const llrp_u16v_t &rValue)
Assignement operator. Used to copy an existing instance.
EResultCode enroll(const CTypeDescriptor *pTypeDescriptor)
Add a type descriptor to the registry.
const char * m_pName
Short name for the vendor, e.g. "Acme".
virtual void put_u16v(llrp_u16v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u16v_t into the encode stream.
This is the base class for all parameter and message types.
char * m_pName
String name of field (e.g. "ROSpecID")
const CTypeDescriptor * m_pType
The type descriptor desribing this element.
llrp_s64_t * m_pValue
Pointer to the first array element.
llrp_u16_t m_nValue
The number of arrray elements.
Class for LLRP basic type bytesToEnd (vector of unsigned bytes)
virtual void put_s32v(llrp_s32v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_s32v_t into the encode stream.
llrp_u8_t * m_pValue
Pointer to the first array element.
~llrp_s16v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
Class for LLRP basic type s8v (List of signed 8-bit values)
virtual llrp_u2_t get_u2(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u2_t into the specified field descriptor.
virtual llrp_u32v_t get_u32v(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u32v_t into the specified field descriptor.
const CTypeDescriptor * m_apStdMessageTypeDescriptors[1024u]
Standard messages subscripted by type number.
FieldType
Describes the basic field type.
Class for LLRP basic type u16v (List of unsigned 16-bit values)
void clearSubParameterList(tListOfParameters *pParameterList)
Clear a list of subparameters. For each entry apply removeSubParameter().
FieldFormat m_eFieldFormat
A code for how the field should be formatted.
virtual void put_e16(int eValue, const CFieldDescriptor *pFieldDesc)=0
Encodes a 16-bit enumerated type into the encode stream.
CErrorDetails m_ErrorDetails
The error details from the last decode operation.
virtual llrp_u64v_t get_u64v(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u64v_t into the specified field descriptor.
const CFieldDescriptor * m_pRefField
If non-NULL this is the field descriptors for the errored field.
virtual void put_bytesToEnd(llrp_bytesToEnd_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an put_bytesToEnd into the encode stream.
llrp_s32_t * m_pValue
Pointer to the first array element.
llrp_u8_t * m_pValue
Pointer to the first array element.
virtual int get_e16(const CFieldDescriptor *pFieldDesc)=0
Decodes a 16 bit enumerated field into the specified field descriptor.
const CTypeDescriptor * m_apStdParameterTypeDescriptors[1024u]
Standard parameters subscripted by type number.
llrp_s32v_t(void)
Default Constructer. Sets members fields to zero.
void unexpectedParameter(const CParameter *pParameter)
Convenience function used by the toolkit to set CErrorDetails when it encounters an unexpected parame...
virtual void put_s8v(llrp_s8v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u8_t (unsigned 8-bit number) into the encode stream.
virtual void put_u64v(llrp_u64v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u64v_t into the encode stream.
const CTypeDescriptor * m_pRefType
If non-NULL this is the type descriptors for the errored type.
virtual CMessage * decodeMessage(void)=0
Decodes a message into the return value CMessage.
const CTypeDescriptor * lookupParameter(unsigned int ParameterTypeNum) const
Lookup a standard parameter type descriptor. NULL=>not found.
EResultCode m_eResultCode
Result code from operation.
Class for LLRP basic type u96 (96-bit value)
virtual llrp_u16_t get_u16(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u16_t (unsigned 16-bit number) into the specified field descriptor.
virtual void put_u2(llrp_u2_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u2_t (unsigned 2-bit number) into the encode stream.
virtual llrp_u32_t get_u32(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u32_t (unsigned 32-bit number) into the specified field descriptor.
virtual void put_s16(llrp_s16_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_s16_t (signed 16-bit number) into the encode stream.
virtual int get_e1(const CFieldDescriptor *pFieldDesc)=0
Decodes a 1 bit enumerated field into the specified field descriptor.
virtual void put_u1v(llrp_u1v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u1v_t (unsigned 1-bit number) into the encode stream.
llrp_s8v_t(void)
Default Constructer. Sets members fields to zero.
virtual llrp_u1v_t get_u1v(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u1v_t into the specified field descriptor.
virtual void put_u32(llrp_u32_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u32_t (unsigned 32-bit number) into the encode stream.
llrp_u32_t m_TypeNum
Type number or, for custom, subtype number.
const char * m_pWhatStr
Descriptive printable error string.
EResultCode toXMLString(char *pBuffer, int nBuffer)
A wrapper around LLRP::toXMLString()
llrp_utf8v_t & operator=(const llrp_utf8v_t &rValue)
Assignement operator. Used to copy an existing instance.
Class for LLRP basic type s32v (vector of signed 32-bit values)
EResultCode
Error result codes for LTK operations.
virtual int get_e2(const CFieldDescriptor *pFieldDesc)=0
Decodes a 2 bit enumerated field into the specified field descriptor.
virtual void encode(CEncoderStream *pEncoderStream) const =0
Encode fields and subparameters.
virtual void decodeFields(CDecoderStream *pDecoderStream)=0
Virtual function provided by each specific element type to decode fields (simple values). Leaves pDecoderStream at first subparameter.
llrp_u16v_t(void)
Default Constructer. Sets members fields to zero.
virtual void put_u64(llrp_u64_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u64_t (unsigned 64-bit number) into the encode stream.
FieldFormat
Describes the fields display format.
const CFieldDescriptor *const *const m_ppFieldDescriptorTable
Table of pointers to the field descriptors.
virtual llrp_s64v_t get_s64v(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_s64v_t into the specified field descriptor.
Class for LLRP basic type s64v (vector of signed 64-bit values)
int walk(int(*pFunc)(const CElement *pElement, void *pArg), void *pArg, int iDepth, int nMaxDepth) const
Recursive tree walk. The callback is invoked for each element.
llrp_s16v_t & operator=(const llrp_s16v_t &rValue)
Assignement operator. Used to copy an existing instance.
llrp_u16_t m_nValue
The number of arrray elements.
llrp_u16_t m_nValue
The number of arrray elements.
virtual void put_e8(int eValue, const CFieldDescriptor *pFieldDesc)=0
Encodes an 8-bit enumerated type into the encode stream.
virtual void put_s64(llrp_s64_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_s64_t (signed 64-bit number) into the encode stream.
virtual void put_u32v(llrp_u32v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u32v_t into the encode stream.
llrp_u16_t m_nValue
The number of arrray elements.
llrp_s64v_t & operator=(const llrp_s64v_t &rValue)
Assignement operator. Used to copy an existing instance.
llrp_s16_t * m_pValue
Pointer to the first array element.
A collection of pointers to CTypeDescriptors.
std::list< const CTypeDescriptor * > m_listCustomParameterTypeDescriptors
List of custom parameters types.
llrp_utf8v_t(void)
Default Constructer. Sets members fields to zero.
virtual llrp_s8_t get_s8(const CFieldDescriptor *pFieldDesc)=0
Decodes a llrp_s8_t (signed 8-bit number) into the specified field descriptor.
Describes the namespae information for converting LLRP messages to LTK-XML.
virtual void putRequiredSubParameter(const CParameter *pParameter, const CTypeDescriptor *pRefType)=0
Encodes the requiredSubParameter into the encode stream.
~llrp_s32v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
llrp_u32v_t & operator=(const llrp_u32v_t &rValue)
Assignement operator. Used to copy an existing instance.
CErrorDetails(void)
Default Constructor.
llrp_u8v_t & operator=(const llrp_u8v_t &rValue)
Assignement operator. Used to copy an existing instance.
~llrp_u32v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
~llrp_u8v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
void resultCodeAndWhatStr(EResultCode eResultCode, const char *pWhatStr)
Convenience function used by the toolkit to set CErrorDetails result code and pWhatStr.
~llrp_utf8v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
virtual ~CEncoder(void)=0
destructor
virtual void encodeElement(const CElement *pElement)=0
encodes the tree formed by pElement
virtual void put_s64v(llrp_s64v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_s64v_t into the encode stream.
const char * m_pPrefix
Short name for the namespace, e.g. "acmeNS".
llrp_u16_t m_nValue
The number of arrray elements.
llrp_u32v_t(void)
Default Constructer. Sets members fields to zero.
virtual void put_u96(llrp_u96_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u96_t (unsigned 96-bit number) into the encode stream.
llrp_u16_t m_nValue
The number of arrray elements.
virtual llrp_u64_t get_u64(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u64_t (unsigned 64-bit number) into the specified field descriptor.
llrp_u64_t * m_pValue
Pointer to the first array element.
void removeSubParameterFromAllList(CParameter *pParameter)
Delete a subparameter from m_listAllSubParameters. Called by the accessor functions setXXX (to remove...
llrp_s32v_t & operator=(const llrp_s32v_t &rValue)
Assignement operator. Used to copy an existing instance.
FieldType m_eFieldType
A code for the field type.
virtual void put_u16(llrp_u16_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u16_t (unsigned 16-bit number) into the encode stream.
~llrp_u16v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
llrp_u64v_t & operator=(const llrp_u64v_t &rValue)
Assignement operator. Used to copy an existing instance.
CElement * m_pParent
Element that encloses this one, NULL if this is top-level element.
Class for LLRP basic type s16v (List of signed 16-bit values)
virtual llrp_s32v_t get_s32v(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_s32v_t into the specified field descriptor.
virtual void putRequiredSubParameterList(const tListOfParameters *pParameterList, const CTypeDescriptor *pRefType)=0
Encodes the requiredSubParameterList into the encode stream.
virtual llrp_u8_t get_u8(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u8_t (unsigned 8-bit number) into the specified field descriptor. ...
llrp_u16_t m_nValue
The number of arrray elements.
virtual llrp_bool_t isAllowedIn(const CTypeDescriptor *pEnclosingTypeDescriptor) const
Validate whether the element is allowed as a base type in the enclosing element.
const CVendorDescriptor * m_pVendorDescriptor
NULL=>standard LLRP, !NULL=>Vendor (PEN) of custom message or parameter.
virtual void put_u8(llrp_u8_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u8_t (unsigned 8-bit number) into the encode stream.
virtual void put_e2(int eValue, const CFieldDescriptor *pFieldDesc)=0
Encodes a 2-bit enumerated type into the encode stream.
virtual int get_e8(const CFieldDescriptor *pFieldDesc)=0
Decodes a 8 bit enumerated field into the specified field descriptor.
Class for LLRP basic type utf8v (vector of utf-8 encoded characters)
llrp_u16_t m_nBit
The number of arrray elements.
Class for LLRP basic type u1v (vector of unsigned 1-bit values)
const SEnumTableEntry * m_pEnumTable
NULL or ptr to table base for enumerated fields.
void clear(void)
Clears the contents of a CErrorDetails.
Class that encodes internal LTK CElements into messages.
CEncoder(void)
Constructor.
llrp_s16v_t(void)
Default Constructer. Sets members fields to zero.
virtual void putOptionalSubParameter(const CParameter *pParameter, const CTypeDescriptor *pRefType)=0
Encodes the optionalSubParameter into the encode stream.
Describes the vendor information for vendor extension classes.
llrp_u32_t m_VendorID
Vendor PEN of a custom message or parameter.
virtual llrp_u8v_t get_e8v(const CFieldDescriptor *pFieldDesc)=0
Decodes an enumerated u8v field into the specified field descriptor.
llrp_u16_t m_nValue
The number of arrray elements.
llrp_u16_t m_nValue
The number of arrray elements.
const CTypeDescriptor * m_pResponseType
For messages (bIsMessage==TRUE), this is the type descriptor for the corresponding response...
llrp_s64v_t(void)
Default Constructer. Sets members fields to zero.
virtual void put_s32(llrp_s32_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_s32_t (signed 32-bit number) into the encode stream.
virtual llrp_u1_t get_u1(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u1_t (unsigned 1 bit number) into the specified field descriptor. ...
virtual int get_e32(const CFieldDescriptor *pFieldDesc)=0
Decodes a 32 bit enumerated field into the specified field descriptor.
llrp_u1v_t & operator=(const llrp_u1v_t &rValue)
Assignement operator. Used to copy an existing instance.
virtual llrp_bytesToEnd_t get_bytesToEnd(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_bytesToEnd_t into the specified field descriptor.
virtual void put_s8(llrp_s8_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_s8_t (signed 8-bit number) into the encode stream.
~llrp_s8v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
~llrp_s64v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
Class to return error details in LTKCPP operations.
~llrp_u64v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
llrp_u32_t getMessageID(void) const
Gets the current LLRP Message ID for the Message.
virtual void assimilateSubParameters(CErrorDetails *pError)=0
Assimilates the decoded sub-parameters into m_listAllSubParameters.
char * m_pName
String name of parameter/message type (e.g. "ROSpec")
void missingParameter(const CTypeDescriptor *pRefType)
Convenience function used by the toolkit to set CErrorDetails when it encounters an missing parameter...
llrp_u1v_t(void)
Default Constructer. Sets members fields to zero.
virtual llrp_utf8v_t get_utf8v(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_utf8v_t into the specified field descriptor.
void(* m_pfDecodeFields)(CDecoderStream *pDecoderStream, CElement *pTargetElement)
Decoder, sometimes used when we want to decode w/o an instance.
llrp_u16_t m_nValue
The number of arrray elements.
const char * m_pURI
URI for the namespace, this is the true namespace name.
CElement *(* m_pfConstruct)(void)
Function to make an instance of the parameter or message.
virtual void put_e1(int eValue, const CFieldDescriptor *pFieldDesc)=0
Encodes a 1-bit enumerated type into the encode stream.
void addSubParameterToAllList(CParameter *pParameter)
Add a subparameter to m_listAllSubParameters. Called by the accessor functions setXXX and addXXX...
virtual void put_e8v(llrp_u8v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an enumerated u8v type into the encode stream.
std::list< const CTypeDescriptor * > m_listCustomMessageTypeDescriptors
List of custom message types.
const CNamespaceDescriptor * m_pNamespaceDescriptor
Namespace of message or parameter, for XML.
llrp_u16_t * m_pValue
Pointer to the first array element.
virtual void put_e32(int eValue, const CFieldDescriptor *pFieldDesc)=0
Encodes a32-bit enumerated type into the encode stream.
llrp_u8_t m_aValue[12]
Simple array of basic type llrp_u8_t.
~llrp_bytesToEnd_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
llrp_s8v_t & operator=(const llrp_s8v_t &rValue)
Assignement operator. Used to copy an existing instance.
Base Class for All LLRP LTK Parameters.
llrp_byte_t * m_pValue
Pointer to the first array element.
Base Class for All LLRP LTK Messages.
Class for LLRP basic type u8v (List of unsigned 8-bit values)
Describes a single field inside an LTKCPP message or parameters.
virtual llrp_s16_t get_s16(const CFieldDescriptor *pFieldDesc)=0
Decodes a llrp_s16_t (signed 16-bit number) into the specified field descriptor.
virtual void put_u8v(llrp_u8v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u8v_t into the encode stream.
virtual llrp_s32_t get_s32(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_s32_t (signed 32-bit number) into the specified field descriptor. ...
virtual llrp_s8v_t get_s8v(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_s8v_t into the specified field descriptor.
const CTypeDescriptor * lookupCustomParameter(unsigned int VendorID, unsigned int ParameterSubTypeNum) const
Lookup a custom parameter type descriptor. NULL=>not found.
virtual void put_s16v(llrp_s16v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an put_s16v into the encode stream.
virtual llrp_u8v_t get_u8v(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u8v_t into the specified field descriptor.
virtual llrp_u16v_t get_u16v(const CFieldDescriptor *pFieldDesc)=0
Decodes a llrp_u16v_t into the specified field descriptor.
Class for LLRP basic type u32v (vector of unsigned 32-bit values)
llrp_u32_t * m_pValue
Pointer to the first array element.
llrp_u8v_t(void)
Default Constructer. Sets members fields to zero.
llrp_s8_t * m_pValue
Pointer to the first array element.
virtual llrp_s64_t get_s64(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_s64_t (signed 64-bit number) into the specified field descriptor. ...
const CTypeDescriptor * lookupCustomMessage(unsigned int VendorID, unsigned int MessageSubTypeNum) const
Lookup a custom message type descriptor. NULL=>not found.
void setMessageID(llrp_u32_t MessageID)
Sets the LLRP Message ID for the Message.
CErrorDetails m_ErrorDetails
internal storage of encoding errors
Class for LLRP basic type u64v (vector of unsigned 64-bit values)
tListOfParameters m_listAllSubParameters
List of all sub elements.
~llrp_u1v_t(void)
Destructor. Deletes m_pValue in cases where it is allocated.
llrp_bool_t isAllowedExtension(const CTypeDescriptor *pEnclosingTypeDescriptor)
Validate whether the element is allowed as an extension in the enclosing element. ...
virtual void put_utf8v(llrp_utf8v_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an put_utf8v (utf8 character string) into the encode stream.
const char * m_pSchemaLocation
URI for the XSD (schema) for custom parameters and messages defined within the namespace.
virtual llrp_u96_t get_u96(const CFieldDescriptor *pFieldDesc)=0
Decodes an llrp_u96_t into the specified field descriptor.
virtual void put_u1(llrp_u1_t Value, const CFieldDescriptor *pFieldDesc)=0
Encodes an llrp_u64_t (unsigned 64-bit number) into the encode stream.
llrp_utf8_t * m_pValue
Pointer to the first array element.
Class that decodes messages into internal LTK CElements.
llrp_bool_t m_bIsMessage
TRUE for a message type, FALSE for a parameter type.
CElement * constructElement(void) const
Convenience function.
llrp_bytesToEnd_t(void)
Default Constructer. Sets members fields to zero.
virtual void putOptionalSubParameterList(const tListOfParameters *pParameterList, const CTypeDescriptor *pRefType)=0
Encodes the optionalSubParameterList into the encode stream.
llrp_u64v_t(void)
Default Constructer. Sets members fields to zero.
Describes a message or parameter type.