These methods represent the meaning?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi sir ,

Can tell me blecm_XXXXConMux methods meaning ?

111.jpg

Thanks Sir !

0 Likes
1 Solution
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

The next SDK release has these documented in the header. See hello_client for usage. In the meantime,

// The stack/app architecture supports only one connection at any point of time.

// Since the stack and app are event driven, a software mux is used to switch the

// app and stack connection context when some event/action needs to be performed on

// different connections. These functions provide the means to switch between different

// connection contexts.

// Internal function used by the stack to check if the connection context needs to be changed.

INT32  blecm_needToConMux( void );

/**

* Enable connection muxing. This needs to be done once by the app in the create function.

*/

void   blecm_enableConMux( void );

/**

* Disable connection muxing. Generally never done.

*/

void   blecm_disableConMux( void );

/**

* Initialize connection mux. This nees to be done once by the app in the create function.

* \param con_num The max number of connections that can be active at any point in time.

*/

void   blecm_ConMuxInit(INT32 con_num);

/**

* Add the connection to the list of known connections we can mux between. Typically done on connection up.

* \param index The index into which to add the connection information.

* \param con_handle The connection handle of this connection. This handle

*                    is used to look up the connection info structure.

* \param db_size  The size of the GATT DB to be associated with the connection.

* \param p_db The pointer to the GATT DB to be associated with this connection.

* \param dev_pinfo Device information in EMCONINFO_DEVINFO for this connection.

* \param smp_pinfo The SMP information from LESMP_INFO for this connection.

*/

void   blecm_AddConMux(INT32 index, UINT16 con_handle, UINT16 db_size, void *p_db,

                    void *dev_pinfo, void *smp_pinfo);

/**

* Delete the connection mux/context at the given index. Typically done on connection down.

* \param index The index of the connection information to delete.

*/

void   blecm_DelConMux(int index);

/**

* Find a free connection mux/context slot.

* \return Index of the first unused connection info structure or -1 when none are free.

*/

INT32  blecm_FindFreeConMux(void);

/**

* Look up the connection information structure given a handle.

* \param con_handle Connection handle of the connection to look up for.

* \return Index of the connection info structure or -1 when not found.

*/

INT32  blecm_FindConMux(UINT16 con_handle);

/**

* Get the GATT DB size given a connection handle.

* \param con_handle Connection handle of the connection to look up for.

* \return GATT DB size or 0 when not found.

*/

UINT16 blecm_GetDbSizeConMux(UINT16 con_handle);

/**

* Get the GATT DB  given a connection handle.

* \param con_handle Connection handle of the connection to look up for.

* \return GATT DB or NULL when not found.

*/

void   *blecm_GetDbConMux(UINT16 con_handle);

/**

* Get the device information given a connection handle.

* \param con_handle Connection handle of the connection to look up for.

* \return Device information pointer or NULL when not found.

*/

void   *blecm_GetDevConMux(UINT16 con_handle);

/**

* Get the SMP information given a connection handle.

* \param con_handle Connection handle of the connection to look up for.

* \return SMP information pointer or NULL when not found.

*/

void   *blecm_GetSmpConMux(UINT16 con_handle);

/**

* Reset the connection context.

*/

void   blecm_ResetPtrConMux(void);

/**

* Set all the connection contexts to the one for the given connection.

* This is used by the stack to switch connection contexts.

*/

void   blecm_SetPtrConMux(UINT16 con_handle);

// Internal function to check if 8-bitor 16-bit length is used in the app's GATT DB.

INT32  blecm_needToGATTDB16( void );

/**

* Enable 16-bit length fields in application GATT DB. This needs to be invoked before the first

* access to GATT DB occurs (early in create function). The GATT DB provided in the set_cfg function

* should use 16-bit lengths.

*/

void   blecm_enableGATTDB16( void );

/**

* Disable 16-bit length fields in app GATT DB.

*/

void   blecm_disableGATTDB16( void );

View solution in original post

2 Replies
MichaelF_56
Moderator
Moderator
Moderator
250 sign-ins 25 comments on blog 10 comments on blog

Do you mean how these functions are used?  What they are used for, etc.?

What are you trying to use them for?

0 Likes
asridharan
Employee
Employee
10 comments on KBA 5 comments on KBA First comment on KBA

The next SDK release has these documented in the header. See hello_client for usage. In the meantime,

// The stack/app architecture supports only one connection at any point of time.

// Since the stack and app are event driven, a software mux is used to switch the

// app and stack connection context when some event/action needs to be performed on

// different connections. These functions provide the means to switch between different

// connection contexts.

// Internal function used by the stack to check if the connection context needs to be changed.

INT32  blecm_needToConMux( void );

/**

* Enable connection muxing. This needs to be done once by the app in the create function.

*/

void   blecm_enableConMux( void );

/**

* Disable connection muxing. Generally never done.

*/

void   blecm_disableConMux( void );

/**

* Initialize connection mux. This nees to be done once by the app in the create function.

* \param con_num The max number of connections that can be active at any point in time.

*/

void   blecm_ConMuxInit(INT32 con_num);

/**

* Add the connection to the list of known connections we can mux between. Typically done on connection up.

* \param index The index into which to add the connection information.

* \param con_handle The connection handle of this connection. This handle

*                    is used to look up the connection info structure.

* \param db_size  The size of the GATT DB to be associated with the connection.

* \param p_db The pointer to the GATT DB to be associated with this connection.

* \param dev_pinfo Device information in EMCONINFO_DEVINFO for this connection.

* \param smp_pinfo The SMP information from LESMP_INFO for this connection.

*/

void   blecm_AddConMux(INT32 index, UINT16 con_handle, UINT16 db_size, void *p_db,

                    void *dev_pinfo, void *smp_pinfo);

/**

* Delete the connection mux/context at the given index. Typically done on connection down.

* \param index The index of the connection information to delete.

*/

void   blecm_DelConMux(int index);

/**

* Find a free connection mux/context slot.

* \return Index of the first unused connection info structure or -1 when none are free.

*/

INT32  blecm_FindFreeConMux(void);

/**

* Look up the connection information structure given a handle.

* \param con_handle Connection handle of the connection to look up for.

* \return Index of the connection info structure or -1 when not found.

*/

INT32  blecm_FindConMux(UINT16 con_handle);

/**

* Get the GATT DB size given a connection handle.

* \param con_handle Connection handle of the connection to look up for.

* \return GATT DB size or 0 when not found.

*/

UINT16 blecm_GetDbSizeConMux(UINT16 con_handle);

/**

* Get the GATT DB  given a connection handle.

* \param con_handle Connection handle of the connection to look up for.

* \return GATT DB or NULL when not found.

*/

void   *blecm_GetDbConMux(UINT16 con_handle);

/**

* Get the device information given a connection handle.

* \param con_handle Connection handle of the connection to look up for.

* \return Device information pointer or NULL when not found.

*/

void   *blecm_GetDevConMux(UINT16 con_handle);

/**

* Get the SMP information given a connection handle.

* \param con_handle Connection handle of the connection to look up for.

* \return SMP information pointer or NULL when not found.

*/

void   *blecm_GetSmpConMux(UINT16 con_handle);

/**

* Reset the connection context.

*/

void   blecm_ResetPtrConMux(void);

/**

* Set all the connection contexts to the one for the given connection.

* This is used by the stack to switch connection contexts.

*/

void   blecm_SetPtrConMux(UINT16 con_handle);

// Internal function to check if 8-bitor 16-bit length is used in the app's GATT DB.

INT32  blecm_needToGATTDB16( void );

/**

* Enable 16-bit length fields in application GATT DB. This needs to be invoked before the first

* access to GATT DB occurs (early in create function). The GATT DB provided in the set_cfg function

* should use 16-bit lengths.

*/

void   blecm_enableGATTDB16( void );

/**

* Disable 16-bit length fields in app GATT DB.

*/

void   blecm_disableGATTDB16( void );