le_avdata_interface.h
23 * Data is setup as @b assets — a collection of fields that can be managed by the AirVantage33 * A field is referred to by a path, much like a path in Unix-like OSes. So a path is separated by45 * SetNull API. A field does not have a fixed data type, so any of the SetInt/Float/Bool/String can57 * This is optional for variable and setting fields, but is required for command fields. Registered58 * handlers are called only when activities from AV server occurs. Client activites do not trigger61 * A handler registered with a command field is invoked with an optional argument list sent from the62 * AV server. The APIs GetInt/Float/Bool/StringArg and GetStringArgLength are available to extract74 * le_avdata_RecordInt(), le_avdata_RecordFloat(), le_avdata_RecordBool and le_avdata_RecordString76 * @c avms session, and push the collected history data using le_avdata_PushRecord(). The callback77 * used when calling le_avdata_PushRecord() will indicate whether the push has been successful or not.104 * utcMilliSec = (uint64_t)(tv.tv_sec) * 1000 + (uint64_t)(tv.tv_usec) / 1000; // get current time118 * An app can request to open avms session and register a handler to get notified of avms session120 * open an avms session and close an avms session respectively. If the session was initiated by an122 * le_avdata_AddSessionStateHandler() and le_avdata_RemoveSessionStateHandler() can be used to add142 //--------------------------------------------------------------------------------------------------146 //--------------------------------------------------------------------------------------------------149 //--------------------------------------------------------------------------------------------------152 * Connect the current client thread to the service providing this API. Block until the service is155 * For each thread that wants to use this API, either ConnectService or TryConnectService must be156 * called before any other functions in this API. Normally, ConnectService is automatically called161 //--------------------------------------------------------------------------------------------------167 //--------------------------------------------------------------------------------------------------170 * Try to connect the current client thread to the service providing this API. Return with an error173 * For each thread that wants to use this API, either ConnectService or TryConnectService must be174 * called before any other functions in this API. Normally, ConnectService is automatically called183 * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).186 //--------------------------------------------------------------------------------------------------192 //--------------------------------------------------------------------------------------------------196 * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants199 //--------------------------------------------------------------------------------------------------206 //--------------------------------------------------------------------------------------------------212 * longer a connection to the service, and the functions in this API can't be used. For details, see217 //--------------------------------------------------------------------------------------------------224 //--------------------------------------------------------------------------------------------------228 //--------------------------------------------------------------------------------------------------231 //--------------------------------------------------------------------------------------------------234 //--------------------------------------------------------------------------------------------------237 //--------------------------------------------------------------------------------------------------241 //--------------------------------------------------------------------------------------------------244 //--------------------------------------------------------------------------------------------------247 //--------------------------------------------------------------------------------------------------250 //--------------------------------------------------------------------------------------------------257 //--------------------------------------------------------------------------------------------------270 //--------------------------------------------------------------------------------------------------274 //--------------------------------------------------------------------------------------------------284 //--------------------------------------------------------------------------------------------------288 //--------------------------------------------------------------------------------------------------305 //--------------------------------------------------------------------------------------------------309 //--------------------------------------------------------------------------------------------------320 //--------------------------------------------------------------------------------------------------324 //--------------------------------------------------------------------------------------------------328 //--------------------------------------------------------------------------------------------------332 //--------------------------------------------------------------------------------------------------336 //--------------------------------------------------------------------------------------------------340 //--------------------------------------------------------------------------------------------------344 //--------------------------------------------------------------------------------------------------348 //--------------------------------------------------------------------------------------------------352 //--------------------------------------------------------------------------------------------------356 //--------------------------------------------------------------------------------------------------367 //--------------------------------------------------------------------------------------------------371 //--------------------------------------------------------------------------------------------------375 //--------------------------------------------------------------------------------------------------379 //--------------------------------------------------------------------------------------------------392 //--------------------------------------------------------------------------------------------------396 //--------------------------------------------------------------------------------------------------405 //--------------------------------------------------------------------------------------------------409 //--------------------------------------------------------------------------------------------------418 //--------------------------------------------------------------------------------------------------426 * For "commands", the handler function must call the "ReplyExecResult" function to send the command430 //--------------------------------------------------------------------------------------------------442 //--------------------------------------------------------------------------------------------------446 //--------------------------------------------------------------------------------------------------453 //--------------------------------------------------------------------------------------------------455 * Create an asset data with the provided path. Note that asset data type and value are determined456 * upon the first call to a Set function. When an asset data is created, it contains a null value,465 //--------------------------------------------------------------------------------------------------475 //--------------------------------------------------------------------------------------------------484 //--------------------------------------------------------------------------------------------------492 //--------------------------------------------------------------------------------------------------503 //--------------------------------------------------------------------------------------------------513 //--------------------------------------------------------------------------------------------------522 //--------------------------------------------------------------------------------------------------532 //--------------------------------------------------------------------------------------------------543 //--------------------------------------------------------------------------------------------------553 //--------------------------------------------------------------------------------------------------562 //--------------------------------------------------------------------------------------------------572 //--------------------------------------------------------------------------------------------------583 //--------------------------------------------------------------------------------------------------593 //--------------------------------------------------------------------------------------------------602 //--------------------------------------------------------------------------------------------------612 //--------------------------------------------------------------------------------------------------623 //--------------------------------------------------------------------------------------------------635 //--------------------------------------------------------------------------------------------------644 //--------------------------------------------------------------------------------------------------654 //--------------------------------------------------------------------------------------------------662 //--------------------------------------------------------------------------------------------------674 //--------------------------------------------------------------------------------------------------682 //--------------------------------------------------------------------------------------------------694 //--------------------------------------------------------------------------------------------------702 //--------------------------------------------------------------------------------------------------714 //--------------------------------------------------------------------------------------------------722 //--------------------------------------------------------------------------------------------------736 //--------------------------------------------------------------------------------------------------738 * Get the length (excluding terminating null byte) of the string argument of the specified name.744 //--------------------------------------------------------------------------------------------------756 //--------------------------------------------------------------------------------------------------758 * Reply command execution result to AVC Daemon, which can then respond to AV server. This function759 * MUST be called at the end of a command execution, in order for AV server to be notified about the762 //--------------------------------------------------------------------------------------------------769 //--------------------------------------------------------------------------------------------------780 //--------------------------------------------------------------------------------------------------792 //--------------------------------------------------------------------------------------------------798 //--------------------------------------------------------------------------------------------------804 //--------------------------------------------------------------------------------------------------808 //--------------------------------------------------------------------------------------------------815 //--------------------------------------------------------------------------------------------------819 * @note The client will be terminated if the recordRef is not valid, or the resource doesn't exist826 //--------------------------------------------------------------------------------------------------840 //--------------------------------------------------------------------------------------------------844 * @note The client will be terminated if the recordRef is not valid, or the resource doesn't exist851 //--------------------------------------------------------------------------------------------------865 //--------------------------------------------------------------------------------------------------869 * @note The client will be terminated if the recordRef is not valid, or the resource doesn't exist876 //--------------------------------------------------------------------------------------------------890 //--------------------------------------------------------------------------------------------------894 * @note The client will be terminated if the recordRef is not valid, or the resource doesn't exist901 //--------------------------------------------------------------------------------------------------915 //--------------------------------------------------------------------------------------------------928 //--------------------------------------------------------------------------------------------------939 //--------------------------------------------------------------------------------------------------945 //--------------------------------------------------------------------------------------------------954 //--------------------------------------------------------------------------------------------------958 //--------------------------------------------------------------------------------------------------965 //--------------------------------------------------------------------------------------------------973 //--------------------------------------------------------------------------------------------------979 //--------------------------------------------------------------------------------------------------