|
typedef void(* | rtxStartElement) (const char *name, OSSIZE idx) |
|
typedef void(* | rtxEndElement) (const char *name, OSSIZE idx) |
|
typedef void(* | rtxBoolValue) (OSBOOL value) |
|
typedef void(* | rtxIntValue) (OSINT32 value) |
|
typedef void(* | rtxUIntValue) (OSUINT32 value) |
|
typedef void(* | rtxInt64Value) (OSINT64 value) |
|
typedef void(* | rtxUInt64Value) (OSUINT64 value) |
|
typedef void(* | rtxBitStrValue) (OSSIZE numbits, const OSOCTET *data) |
|
typedef void(* | rtxOctStrValue) (OSSIZE numocts, const OSOCTET *data) |
|
typedef void(* | rtxCharStrValue) (const char *value) |
|
typedef void(* | rtxCharStrValue16Bit) (OSSIZE nchars, OSUNICHAR *data) |
|
typedef void(* | rtxCharStrValue32Bit) (OSSIZE nchars, OS32BITCHAR *data) |
|
typedef void(* | rtxNullValue) (void) |
|
typedef void(* | rtxOidValue) (OSUINT32 numSubIds, OSUINT32 *pSubIds) |
|
typedef void(* | rtxRealValue) (double value) |
|
typedef void(* | rtxEnumValue) (OSUINT32 value, const OSUTF8CHAR *text) |
|
typedef void(* | rtxOpenTypeValue) (OSSIZE numocts, const OSOCTET *data) |
|
typedef int(* | rtErrorHandler) (OSCTXT *pctxt, ASN1CCB *pCCB, int stat) |
|
typedef struct Asn1NamedCEventHandler | Asn1NamedCEventHandler |
|
|
void | rtAddEventHandler (OSCTXT *pCtxt, Asn1NamedCEventHandler *pHandler) |
|
void | rtRemoveEventHandler (OSCTXT *pCtxt, Asn1NamedCEventHandler *pHandler) |
|
void | rtSetErrorHandler (OSCTXT *pctxt, rtErrorHandler pErrCB) |
|
void | rtRemoveErrorHandler (OSCTXT *pctxt) |
|
int | rtInvokeErrorHandler (OSCTXT *pctxt, ASN1CCB *pCCB, int stat) |
|
void | rtInvokeStartElement (OSCTXT *pCtxt, const char *name, OSSIZE idx) |
|
void | rtInvokeEndElement (OSCTXT *pCtxt, const char *name, OSSIZE idx) |
|
void | rtInvokeBoolValue (OSCTXT *pCtxt, OSBOOL value) |
|
void | rtInvokeIntValue (OSCTXT *pCtxt, OSINT32 value) |
|
void | rtInvokeUIntValue (OSCTXT *pCtxt, OSUINT32 value) |
|
void | rtInvokeInt64Value (OSCTXT *pCtxt, OSINT64 value) |
|
void | rtInvokeUInt64Value (OSCTXT *pCtxt, OSUINT64 value) |
|
void | rtInvokeBitStrValue (OSCTXT *pCtxt, OSSIZE numbits, const OSOCTET *data) |
|
void | rtInvokeOctStrValue (OSCTXT *pCtxt, OSSIZE numocts, const OSOCTET *data) |
|
void | rtInvokeCharStrValue (OSCTXT *pCtxt, const char *value) |
|
void | rtInvokeCharStr16BitValue (OSCTXT *pCtxt, OSSIZE nchars, OSUNICHAR *data) |
|
void | rtInvokeCharStr32BitValue (OSCTXT *pCtxt, OSSIZE nchars, OS32BITCHAR *data) |
|
void | rtInvokeNullValue (OSCTXT *pCtxt) |
|
void | rtInvokeOidValue (OSCTXT *pCtxt, OSUINT32 numSubIds, OSUINT32 *pSubIds) |
|
void | rtInvokeRealValue (OSCTXT *pCtxt, double value) |
|
void | rtInvokeEnumValue (OSCTXT *pCtxt, OSUINT32 value, const OSUTF8CHAR *text) |
|
void | rtInvokeOpenTypeValue (OSCTXT *pCtxt, OSSIZE numocts, const OSOCTET *data) |
|
Asn1CEventHandler is a structure typed used for user-defined event handlers.
◆ Asn1NamedCEventHandler
This is a basic C based event handler structure, which can be used to define user-defined event handlers.
◆ rtErrorHandler
typedef int(* rtErrorHandler) (OSCTXT *pctxt, ASN1CCB *pCCB, int stat) |
This is a function pointer for a callback function which is invoked from within a decode function when an error occurs. This allows users to intercept errors in decoding and recover from them.
- Parameters
-
pctxt | Pointer to an OSCTXT data structure. |
pCCB | Pointer to an ASN1CCB data structure; this is the context control block that contains information pertinent to parsing data in an ASN.1 message. |
stat | The error status. |
- Returns
- The new error status.
◆ rtxBitStrValue
typedef void(* rtxBitStrValue) (OSSIZE numbits, const OSOCTET *data) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the BIT STRING ASN.1 type is parsed.
- Parameters
-
numbits | - Number of bits in the parsed value. |
data | - Pointer to a byte array that contains the bit string data. |
- Returns
- - none
◆ rtxBoolValue
typedef void(* rtxBoolValue) (OSBOOL value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the BOOLEAN ASN.1 type is parsed.
- Parameters
-
- Returns
- - none
◆ rtxCharStrValue
typedef void(* rtxCharStrValue) (const char *value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of one of the 8-bit ASN.1 character string types is parsed.
- Parameters
-
value | Null terminated character string value. |
- Returns
- - none
◆ rtxCharStrValue16Bit
typedef void(* rtxCharStrValue16Bit) (OSSIZE nchars, OSUNICHAR *data) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of one of the 16-bit ASN.1 character string types is parsed.
This is used for the ASN.1 BmpString type.
- Parameters
-
nchars | Number of characters in the parsed value. |
data | Pointer to an array containing 16-bit values. These are represented using unsigned short integer values. |
- Returns
- - none
◆ rtxCharStrValue32Bit
typedef void(* rtxCharStrValue32Bit) (OSSIZE nchars, OS32BITCHAR *data) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of one of the 32-bit ASN.1 characer string types is parsed.
This is used for the ASN.1 UniversalString type.
- Parameters
-
nchars | Number of characters in the parsed value. |
data | Pointer to an array containing 32-bit values. Each 32-bit integer value is a universal character. |
- Returns
- - none
◆ rtxEndElement
typedef void(* rtxEndElement) (const char *name, OSSIZE idx) |
This is a function pointer for a callback function which is invoked from within a decode function when parsing is complete on an element of a SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE construct.
- Parameters
-
name | For SEQUENCE, SET, or CHOICE, this is the name of the element as defined in the ASN.1 defination. For SEQUENCE OF or SET OF, this is set to the name "element". |
idx | For SEQUENCE, SET, or CHOICE, this is not used and is set to the value -1. For SEQUENCE OF or SET OF, this contains the zero-based index of the element in the conceptual array associated with the construct. |
- Returns
- - none
◆ rtxEnumValue
typedef void(* rtxEnumValue) (OSUINT32 value, const OSUTF8CHAR *text) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the ENUMERATED ASN.1 type is parsed.
- Parameters
-
value | - Parsed enumerated value |
text | - Textual value of the enumerated identifier |
- Returns
- - none
◆ rtxInt64Value
typedef void(* rtxInt64Value) (OSINT64 value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the 64-bit INTERGER ASN.1 type is parsed.
- Parameters
-
- Returns
- - none
◆ rtxIntValue
typedef void(* rtxIntValue) (OSINT32 value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the INTERGER ASN.1 type is parsed.
- Parameters
-
- Returns
- - none
◆ rtxNullValue
typedef void(* rtxNullValue) (void) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the NULL ASN.1 type is parsed.
- Parameters
-
- Returns
- - none
◆ rtxOctStrValue
typedef void(* rtxOctStrValue) (OSSIZE numocts, const OSOCTET *data) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of one of the OCTET STRING ASN.1 type is parsed.
- Parameters
-
numocts | Number of octets in the parsed value. |
data | Pointer to byte array containing the octet string data. |
- Returns
- - none
◆ rtxOidValue
typedef void(* rtxOidValue) (OSUINT32 numSubIds, OSUINT32 *pSubIds) |
This is a function pointer for a callback function which is invoked from within a decode function whn a value the OBJECT IDENTIFIER ASN.1 type is parsed.
- Parameters
-
numSubIds | Number of subidentifiers in the object identifier. |
pSubIds | Pointer to array containing the subidentifier values. |
- Returns
- -none
◆ rtxOpenTypeValue
typedef void(* rtxOpenTypeValue) (OSSIZE numocts, const OSOCTET *data) |
This is a function pointer for a callback function which is invoked from within a decode function when an ASN.1 open type is parsed.
- Parameters
-
numocts | Number of octets in the parsed value. |
data | Pointer to byet array contain in tencoded ASN.1 value. |
- Returns
- - none
◆ rtxRealValue
typedef void(* rtxRealValue) (double value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value the REAL ASN.1 type is parsed.
- Parameters
-
- Returns
- - none
◆ rtxStartElement
typedef void(* rtxStartElement) (const char *name, OSSIZE idx) |
This is a function pointer for a callback function which is invoked from within a decode function when an element of a SEQUENCE, SET, SEQUENCE OF, SET OF, or CHOICE construct is parsed.
- Parameters
-
name | For SEQUENCE, SET, or CHOICE, this is the name of the element as defined in the ASN.1 defination. For SEQUENCE OF or SET OF, this is set to the name "element". |
idx | For SEQUENCE, SET, or CHOICE, this is not used and is set to the value -1. For SEQUENCE OF or SET OF, this contains the zero-based index of the element in the conceptual array associated with the construct. |
- Returns
- - none
◆ rtxUInt64Value
typedef void(* rtxUInt64Value) (OSUINT64 value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the 64-bit INTEGER ASN.1 type is parsed.
- Parameters
-
- Returns
- - none
◆ rtxUIntValue
typedef void(* rtxUIntValue) (OSUINT32 value) |
This is a function pointer for a callback function which is invoked from within a decode function when a value of the INTEGER ASN.1 type is parsed. In this case, constraints on the integer value forced the use of unsigned integer C type to represent the value.
- Parameters
-
- Returns
- - none
◆ rtAddEventHandler()
This function is called to add a new event handler to the context event handler list.
- Parameters
-
pCtxt | Context to which event handler has to be added. |
pHandler | Pointer to the event handler structure. |
- Returns
- none
◆ rtInvokeBitStrValue()
void rtInvokeBitStrValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSSIZE |
numbits, |
|
|
const OSOCTET * |
data |
|
) |
| |
This function is called by generated code to invoke the event handler's bit string value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
numbits | The number of bits contained in the decoded bit string. |
data | A pointer to the decoded octets containing the data. |
◆ rtInvokeBoolValue()
void rtInvokeBoolValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSBOOL |
value |
|
) |
| |
This function is called by generated code to invoke the event handler's boolean value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
value | The decoded boolean value passed to the event handler. |
◆ rtInvokeCharStr16BitValue()
void rtInvokeCharStr16BitValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSSIZE |
nchars, |
|
|
OSUNICHAR * |
data |
|
) |
| |
This function is called by generated code to invoke the event handler's 16-bit character string value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
nchars | The number of characters in the string. |
value | The decoded 16-bit character string. |
◆ rtInvokeCharStr32BitValue()
void rtInvokeCharStr32BitValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSSIZE |
nchars, |
|
|
OS32BITCHAR * |
data |
|
) |
| |
This function is called by generated code to invoke the event handler's 32-bit character string value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
nchars | The number of characters in the string. |
value | The decoded 32-bit character string. |
◆ rtInvokeCharStrValue()
void rtInvokeCharStrValue |
( |
OSCTXT * |
pCtxt, |
|
|
const char * |
value |
|
) |
| |
This function is called by generated code to invoke the event handler's character string value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
value | The decoded character string. |
◆ rtInvokeEndElement()
void rtInvokeEndElement |
( |
OSCTXT * |
pCtxt, |
|
|
const char * |
name, |
|
|
OSSIZE |
idx |
|
) |
| |
This function is called by generated code to invoke the event handler's end element function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
name | The name of the element on which the function is called. |
idx | The index of the element (for use in SEQUENCE OF items). |
◆ rtInvokeEnumValue()
void rtInvokeEnumValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSUINT32 |
value, |
|
|
const OSUTF8CHAR * |
text |
|
) |
| |
This function is called by generated code to invoke the event handler's enumerated value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
value | The integer value corresponding to the enumerated value. |
text | The character string text that represents the enumerated value. |
◆ rtInvokeErrorHandler()
int rtInvokeErrorHandler |
( |
OSCTXT * |
pctxt, |
|
|
ASN1CCB * |
pCCB, |
|
|
int |
stat |
|
) |
| |
This function invokes the error handler callback defined inside the context.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
pCCB | A pointer to an ASN1CCB data structure. |
stat | The error status encountered. |
- Returns
- None.
- See also
- rtSetErrorHandler
-
rtErrorHandler
◆ rtInvokeInt64Value()
void rtInvokeInt64Value |
( |
OSCTXT * |
pCtxt, |
|
|
OSINT64 |
value |
|
) |
| |
This function is called by generated code to invoke the event handler's signed 64-bit integer value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
value | The decoded signed 64-bit integer value passed to the event handler. |
◆ rtInvokeIntValue()
void rtInvokeIntValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSINT32 |
value |
|
) |
| |
This function is called by generated code to invoke the event handler's signed integer value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
value | The decoded signed integer value passed to the event handler. |
◆ rtInvokeNullValue()
void rtInvokeNullValue |
( |
OSCTXT * |
pCtxt | ) |
|
This function is called by generated code to invoke the event handler's null value function. No value is required for NULL types.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
◆ rtInvokeOctStrValue()
void rtInvokeOctStrValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSSIZE |
numocts, |
|
|
const OSOCTET * |
data |
|
) |
| |
This function is called by generated code to invoke the event handler's octet string value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
numocts | The number of octets contained in the decoded octet string. |
data | A pointer to the decoded octets containing the data. |
◆ rtInvokeOidValue()
void rtInvokeOidValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSUINT32 |
numSubIds, |
|
|
OSUINT32 * |
pSubIds |
|
) |
| |
This function is called by generated code to invoke the event handler's object identifier value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
numSubIds | The number of sub ids in the OID value. |
pSubIds | The sub ids that comprise the OID value. |
◆ rtInvokeOpenTypeValue()
void rtInvokeOpenTypeValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSSIZE |
numocts, |
|
|
const OSOCTET * |
data |
|
) |
| |
This function is called by generated code to invoke the event handler's open type value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
numocts | The number of octets the decoded open type contains. |
data | The content of the decoded open type. |
◆ rtInvokeRealValue()
void rtInvokeRealValue |
( |
OSCTXT * |
pCtxt, |
|
|
double |
value |
|
) |
| |
This function is called by generated code to invoke the event handler's real value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
value | The decoded real value. |
◆ rtInvokeStartElement()
void rtInvokeStartElement |
( |
OSCTXT * |
pCtxt, |
|
|
const char * |
name, |
|
|
OSSIZE |
idx |
|
) |
| |
This function is called by generated code to invoke the event handler's StartElement function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
name | The name of the element on which the function is called. |
idx | The index of the element (for use in SEQUENCE OF items). |
◆ rtInvokeUInt64Value()
void rtInvokeUInt64Value |
( |
OSCTXT * |
pCtxt, |
|
|
OSUINT64 |
value |
|
) |
| |
This function is called by generated code to invoke the event handler's unsigned 64-bit integer value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
value | The decoded unsigned 64-bit integer value passed to the event handler. |
◆ rtInvokeUIntValue()
void rtInvokeUIntValue |
( |
OSCTXT * |
pCtxt, |
|
|
OSUINT32 |
value |
|
) |
| |
This function is called by generated code to invoke the event handler's unsigned integer value function.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
value | The decoded unsigned integer value passed to the event handler. |
◆ rtRemoveErrorHandler()
void rtRemoveErrorHandler |
( |
OSCTXT * |
pctxt | ) |
|
This function removes the error handler from the given context.
- Parameters
-
pctxt | A pointer to an OSCTXT data structure. |
- Returns
- None.
◆ rtRemoveEventHandler()
This function is called to remove an event handler from the context event handler list. Note that it does not delete the event handler object.
- Parameters
-
pCtxt | Context from which event handler has to be removed. |
pHandler | Pointer to event handler structure. |
- Returns
- none
◆ rtSetErrorHandler()
This function is called to set the error handler in an OSCTXT data structure. The error handler is called within generated code if an error occurs during message parsing. Only one error handler may be used at a time.
- Parameters
-
pctxt | A pointer to an OSCTXT structure used for decoding. |
pErrCB | A pointer to the rtErrorHandler callback function. |
- Returns
- None.