XDK API  3.6.0
Documentation
Data Structures | Typedefs | Enumerations | Functions
Serval_Msg_Obsolete.h File Reference
#include <Serval_Types.h>
#include <Serval_Policy.h>
#include <Serval_Msg.h>
+ Include dependency graph for Serval_Msg_Obsolete.h:
+ This graph shows which files directly or indirectly include this file:

Data Structures

struct  MsgSendingCtx_S
 
union  MsgSendingCtx_S::Socket_U
 

Typedefs

typedef struct CoapMsg_S CoapMsg_T
 
typedef struct Lwm2mMsg_S Lwm2mMsg_T
 
typedef struct MsgSendingCtx_S MsgSendingCtx_T
 
typedef struct OutMsgFactory_S OutMsgFactory_T
 
typedef struct RestMsg_S RestMsg_T
 
typedef struct Msg_S TLPMsg_T
 
typedef struct WebMsg_S WebMsg_T
 
typedef struct XTcpMsg_S XTcpMsg_T
 
typedef struct XUdpMsg_S XUdpMsg_T
 

Enumerations

enum  Msg_ALP_T
 
enum  Msg_TLP_T
 

Functions

void Msg_callbackApp (Msg_T *msg_ptr, retcode_t status)
 
Msg_ALP_T Msg_getALP (Msg_T const *msg_ptr)
 
Msg_TMsg_getContext (Callable_T *callable_ptr)
 
OutMsgFactory_TMsg_getFactory (Msg_T *msg_ptr)
 
Lwm2mMsg_TMsg_getLwm2mMsg (Msg_T *msg_ptr)
 
RestMsg_TMsg_getRestMsg (Msg_T *msg_ptr)
 
Msg_TLP_T Msg_getTLP (Msg_T *const msg_ptr)
 
static TLPMsg_TMsg_getTLPMsg (Msg_T *msg_ptr)
 
WebMsg_TMsg_getWebMsg (Msg_T *msg_ptr)
 
XTcpMsg_TMsg_getXTcpMsg (Msg_T *msg_ptr)
 
XUdpMsg_TMsg_getXUdMsg (Msg_T *msg_ptr)
 
void Msg_open (Msg_T *msg_ptr)
 
static retcode_t Msg_prependPartFactory (Msg_T *msg_ptr, OutMsgPartFactoryFunc_T partFactoryFunc_ptr)
 
void Msg_releaseCommBuf (Msg_T *msg_ptr)
 
retcode_t Msg_respond (Msg_T *msg_ptr, AppOutput_T *appOutput_ptr, AppCallback_T appCallback)
 
void Msg_setALP (Msg_T *msg_ptr, Msg_ALP_T alp)
 
void Msg_setAppCallback (Msg_T *msg_ptr, AppCallback_T appCallback)
 
void Msg_setTLP (Msg_T *msg_ptr, Msg_TLP_T tlp)
 

Typedef Documentation

typedef struct CoapMsg_S CoapMsg_T

The data structure for messages of the UDP based application protocol COAP.

See also
struct CoapMsg_S
typedef struct Lwm2mMsg_S Lwm2mMsg_T

The data structure for lightweight M2M messages.

Since
1.4
See also
struct Lwm2mMsg_S

This data structure holds the data needed for sending a message.

See also
struct MsgSendingCtx_S
typedef struct OutMsgFactory_S OutMsgFactory_T

The data structure for OutMsgFactory of a message, which is responsible for serializing the outgoing packets.

See also
struct OutMsgFactory_S
typedef struct RestMsg_S RestMsg_T

The data structure for RESTful messages.

See also
struct RestMsg_S
typedef struct Msg_S TLPMsg_T

This is an obsolete data structure for the lower layer. The API does not offer any further use for the type and it is highly discouraged to use it.

It aliases Msg_T in order to maintain compatibility should an application have used it. However, SERVAL_POLICY_REMOVE_TLPMSG defaults to true and it must be explicitly disabled if this structure is required.

typedef struct WebMsg_S WebMsg_T

The data structure for Webserver messages.

See also
struct WebMsg_S
typedef struct XTcpMsg_S XTcpMsg_T

The data structure for messages of the generic proprietary TCP based application protocol XTCP.

Since
1.4
See also
struct XTcpMsg_S
typedef struct XUdpMsg_S XUdpMsg_T

The data structure for messages of the generic proprietary UDP based application protocol XUDP.

See also
struct XUdpMsg_S

Enumeration Type Documentation

enum Msg_ALP_T

This enum specifies the message types for the supported application protocol.

Enumerator
MSG_ALP_NONE 

This is dummy type meaning that the type of message has not been yet specified.

MSG_ALP_WEB 

This means that the message is a webserver message.

MSG_ALP_REST 
MSG_ALP_XUDP 

This means that the message is a XUDP message.

MSG_ALP_XTCP 

This means that the message is a XTCP message.

Since
1.4
MSG_ALP_LWM2M 

This means that the message is an lwm2m message

Since
1.4
enum Msg_TLP_T

This enum specifies the supported message types of the lower protocols which are used by the application protocols as transport protocols.

Enumerator
MSG_TLP_NONE 

This is dummy type meaning that the type of message has not been yet specified.

MSG_TLP_UDP 

This means that the message on the lower-layer is a UDP message.

MSG_TLP_HTTP 

This means that the message on the lower-layer is an HTTP message.

MSG_TLP_COAP 

This means that the message on the lower-layer is a CoAP message.

Function Documentation

void Msg_callbackApp ( Msg_T msg_ptr,
retcode_t  status 
)

This function is called to invoke a callback, predefined by application ,on some event to inform application of the event.

Parameters
[in]msg_ptrReference to a Msg_T object which holds the current message. It has to be a valid pointer.
[in]statusStatus to be passed to application indicating the event.
Msg_ALP_T Msg_getALP ( Msg_T const *  msg_ptr)

This function is called to get the flag indicating Application protocol type.

Parameters
[in]msg_ptrReference to the Msg_t object. It has to be a valid pointer.
Returns
value of the ALP flag.
Msg_T* Msg_getContext ( Callable_T callable_ptr)

This function provides a pointer to the context structure of the given callable object. It is assumed here that the callable object is member of a struct. A pointer to the struct will be returned.

Parameters
[in]callable_ptra pointer to the callable object
Returns
a pointer to the enclosing structure which contains the given callable object as a member.
OutMsgFactory_T* Msg_getFactory ( Msg_T msg_ptr)

This function provides a pointer to the factory structure of the given Msg_T object.

Parameters
[in]msg_ptrReference to a Msg_T object which holds the message factory. It has to be a valid pointer.
Returns
a pointer to the required factory structure.
Lwm2mMsg_T* Msg_getLwm2mMsg ( Msg_T msg_ptr)

This function provides a pointer to the structure holding LWM2M message in the given Msg_T object.

Parameters
[in]msg_ptrReference to a Msg_T object. It has to be a valid pointer.
Returns
a pointer of type Lwm2mMsg_T to the required Lwm2m message structure.
Since
1.4
RestMsg_T* Msg_getRestMsg ( Msg_T msg_ptr)

This function provides a pointer to the structure holding REST message in the given Msg_T object.

Parameters
[in]msg_ptrReference to a Msg_T object. It has to be a valid pointer.
Returns
a pointer of type RestMsg_T to the required REST message structure.
Msg_TLP_T Msg_getTLP ( Msg_T *const  msg_ptr)

This function is called to get the flag indicating transfer protocol type.

Parameters
[in]msg_ptrReference to a Msg_T object which holds the current message. It has to be a valid pointer.
Deprecated:
since 1.3. Use protocol specific accessors
Returns
value of the TLP flag.
static TLPMsg_T* Msg_getTLPMsg ( Msg_T msg_ptr)
inlinestatic

This function provides a pointer to the obsolete transport protocol structure of the given Msg_T object.

There is no use for this data structure in the public API and thus this function should not have been used. The structure now aliases Msg_T. However, SERVAL_POLICY_REMOVE_TLPMSG defaults to true and it must be explicitly disabled if this structure is required.

Parameters
[in]msg_ptrReference to a Msg_T object which holds the TLP message. It has to be a valid pointer.
Returns
a pointer to the required TLP structure.
WebMsg_T* Msg_getWebMsg ( Msg_T msg_ptr)

This function provides a pointer to the structure holding web message in the given Msg_T object.

Parameters
[in]msg_ptrReference to a Msg_T object. It has to be a valid pointer.
Returns
a pointer of type WebMsg_T to the required web message structure.
XTcpMsg_T* Msg_getXTcpMsg ( Msg_T msg_ptr)

This function provides a pointer to the structure holding XTCP message in the given Msg_T object.

Parameters
[in]msg_ptrReference to a Msg_T object. It has to be a valid pointer.
Returns
a pointer of type XTcpMsg_T to the required web message structure.
Since
1.4
XUdpMsg_T* Msg_getXUdMsg ( Msg_T msg_ptr)

This function provides a pointer to the structure holding XUDP message in the given Msg_T object.

Parameters
[in]msg_ptrReference to a Msg_T object. It has to be a valid pointer.
Returns
a pointer of type XUdpMsg_T to the required web message structure.
void Msg_open ( Msg_T msg_ptr)

This function is called to open a previously allocated message. Any message must be opened before it can be used. Calling of this function also opens the out message factory related to this message, thus a call to OutMsgFactory_isOpen() must return true after a successful call to this function.

Parameters
[in]msg_ptrReference to a Msg_T object which holds the previously allocated message. It has to be a valid pointer.
static retcode_t Msg_prependPartFactory ( Msg_T msg_ptr,
OutMsgPartFactoryFunc_T  partFactoryFunc_ptr 
)
inlinestatic

Legacy function kept for compatibility

See also
TcpMsg_prependPartFactory

+ Here is the call graph for this function:

void Msg_releaseCommBuf ( Msg_T msg_ptr)

This function is called to release both the communication buffer acquired from lower layer and also based on the TLP clears the internal pointer to this buffer.

Parameters
[in]msg_ptrReference to a Msg_T object which holds the communication buffer to be released. It has to be a valid pointer.
See also
CommBuff_free(), CommBuff_getInvalidBuffer()
retcode_t Msg_respond ( Msg_T msg_ptr,
AppOutput_T appOutput_ptr,
AppCallback_T  appCallback 
)

This function is called from application layer for pushing down a response for a request. Here based on type of application protocol we decide how to construct the message to be sent.

Parameters
[in]msg_ptrReference to a Msg_T object which holds the message to be constructed. It has to be a valid pointer.
[in]appOutput_ptrReference to a AppOutput_T object, this holds the output pointer for response
[in]appCallbackReference to a AppCallback_T object, this holds the application callback to be called to inform application about the success or failure of response.
Returns
RC_OK if the message is successfully pushed down to lower layer for transmission. RC_MSG_FACTORY_SIZE_ERROR if there is issue with message factory size
RC_MSG_FACTORY_ALREADY_COMMITTED if message factory is already committed
RC_HTTP_SEND_ERROR if there is sending error
RC_DPWS_RESPOND_FAILED, otherwise
void Msg_setALP ( Msg_T msg_ptr,
Msg_ALP_T  alp 
)

This function is called to set the flag indicating Application protocol type.

Parameters
[in]msg_ptrReference to the Msg_t object. It has to be a valid pointer.
[in]alpThis holds the value of flag to be assigned.
void Msg_setAppCallback ( Msg_T msg_ptr,
AppCallback_T  appCallback 
)

This function is called to initialize application callback defined by application to inform it of some event.

Parameters
[in]msg_ptrReference to a Msg_T object which holds the current message. It has to be a valid pointer.
[in]appCallbackReference to a AppCallback_T object, this holds the application callback to be called to inform application about the success or failure of response.
void Msg_setTLP ( Msg_T msg_ptr,
Msg_TLP_T  tlp 
)

This function is called to set the flag indicating transfer protocol type.

Parameters
[in]msg_ptrReference to a Msg_T object which holds the current message. It has to be a valid pointer.
[in]tlpThis holds the value of flag to be assigned.

All rights reserved. The use is subject to the XDK SDK EULA by Bosch Connected Devices and Solutions GmbH.
This documentation file has been automatically generated on Thu Mar 14 2019 19:12:46 by doxygen 1.8.8