le_avdata_common.h

Go to the documentation of this file.
1 
2 /*
3  * ====================== WARNING ======================
4  *
5  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
6  * DO NOT MODIFY IN ANY WAY.
7  *
8  * ====================== WARNING ======================
9  */
10 /**
11  * @file le_avdata_common.h
12  *
13  * Type definitions for le_avdata.
14  *
15  */
16 #ifndef LE_AVDATA_COMMON_H_INCLUDE_GUARD
17 #define LE_AVDATA_COMMON_H_INCLUDE_GUARD
18 
19 
20 #include "legato.h"
21 
22 #define IFGEN_LE_AVDATA_PROTOCOL_ID "d042ee9f795ba3ff64aacf91d970b8fc"
23 #define IFGEN_LE_AVDATA_MSG_SIZE 794
24 /** @addtogroup le_avdata
25  * @{ **/
26 
27 
28 //--------------------------------------------------------------------------------------------------
29 /**
30  * Define the maximum characters and bytes of a path name
31  */
32 //--------------------------------------------------------------------------------------------------
33 #define LE_AVDATA_PATH_NAME_LEN 511
34 
35 //--------------------------------------------------------------------------------------------------
36 /**
37  */
38 //--------------------------------------------------------------------------------------------------
39 #define LE_AVDATA_PATH_NAME_BYTES 512
40 
41 //--------------------------------------------------------------------------------------------------
42 /**
43  * Define the maximum characters and bytes of a string
44  */
45 //--------------------------------------------------------------------------------------------------
46 #define LE_AVDATA_STRING_VALUE_LEN 255
47 
48 //--------------------------------------------------------------------------------------------------
49 /**
50  */
51 //--------------------------------------------------------------------------------------------------
52 #define LE_AVDATA_STRING_VALUE_BYTES 256
53 
54 //--------------------------------------------------------------------------------------------------
55 /**
56  * Resource access modes:
57  * - Variable: read (server), read/write (client)
58  * - Setting: read/write (server), read/write (client)
59  * - Command: execute (server)
60  */
61 //--------------------------------------------------------------------------------------------------
62 typedef enum
63 {
65  ///< read(server) or read/write(client)
67  ///< read/write (server) or read/write (client)
69  ///< execute (server)
70 }
72 
73 
74 //--------------------------------------------------------------------------------------------------
75 /**
76  * Resource access types
77  */
78 //--------------------------------------------------------------------------------------------------/// read access type
79 #define LE_AVDATA_ACCESS_READ 0x1/// write access type
80 #define LE_AVDATA_ACCESS_WRITE 0x2/// execute access type
81 #define LE_AVDATA_ACCESS_EXEC 0x4
82 typedef uint32_t le_avdata_AccessType_t;
83 
84 
85 //--------------------------------------------------------------------------------------------------
86 /**
87  * Resource namespace
88  */
89 //--------------------------------------------------------------------------------------------------
90 typedef enum
91 {
92  LE_AVDATA_NAMESPACE_APPLICATION = 0,
93  ///<
94  LE_AVDATA_NAMESPACE_GLOBAL = 1
95  ///<
96 }
98 
99 
100 //--------------------------------------------------------------------------------------------------
101 /**
102  * Data types
103  */
104 //--------------------------------------------------------------------------------------------------
105 typedef enum
106 {
108  ///< Null Data Type
110  ///< Integer Data Type
112  ///< Float Data Type
114  ///< Boolean Data Type
116  ///< String Data Type
117 }
119 
120 
121 //--------------------------------------------------------------------------------------------------
122 /**
123  * Status of the data push
124  * @todo Provide additional status to troubleshoot delivery problems
125  */
126 //--------------------------------------------------------------------------------------------------
127 typedef enum
128 {
130  ///< Push was successful
132  ///< Push has failed
133 }
135 
136 
137 //--------------------------------------------------------------------------------------------------
138 /**
139  * Argument list reference, for command only.
140  */
141 //--------------------------------------------------------------------------------------------------
142 typedef struct le_avdata_ArgumentList* le_avdata_ArgumentListRef_t;
143 
144 
145 //--------------------------------------------------------------------------------------------------
146 /**
147  * Reference type used by Add/Remove functions for EVENT 'le_avdata_ResourceEvent'
148  */
149 //--------------------------------------------------------------------------------------------------
150 typedef struct le_avdata_ResourceEventHandler* le_avdata_ResourceEventHandlerRef_t;
151 
152 
153 //--------------------------------------------------------------------------------------------------
154 /**
155  * A record reference
156  */
157 //--------------------------------------------------------------------------------------------------
158 typedef struct le_avdata_Record* le_avdata_RecordRef_t;
159 
160 
161 //--------------------------------------------------------------------------------------------------
162 /**
163  * Reference returned by RequestSession function and used by ReleaseSession function
164  */
165 //--------------------------------------------------------------------------------------------------
166 typedef struct le_avdata_RequestSessionObj* le_avdata_RequestSessionObjRef_t;
167 
168 
169 //--------------------------------------------------------------------------------------------------
170 /**
171  * AVMS session state
172  */
173 //--------------------------------------------------------------------------------------------------
174 typedef enum
175 {
177  ///< AVMS session started
179  ///< AVMS session stopped
180 }
182 
183 
184 //--------------------------------------------------------------------------------------------------
185 /**
186  * Reference type used by Add/Remove functions for EVENT 'le_avdata_SessionState'
187  */
188 //--------------------------------------------------------------------------------------------------
189 typedef struct le_avdata_SessionStateHandler* le_avdata_SessionStateHandlerRef_t;
190 
191 
192 //--------------------------------------------------------------------------------------------------
193 /**
194  * Handler for resource activity. Note that the path returned by this event follows the unix format
195  * (e.g. "/a/b/c") even if the app uses the URL format (e.g "a.b.c") when registering
196  * the handler.
197  */
198 //--------------------------------------------------------------------------------------------------
199 typedef void (*le_avdata_ResourceHandlerFunc_t)
200 (
201  const char* LE_NONNULL path,
202  ///<
203  le_avdata_AccessType_t accessType,
204  ///<
205  le_avdata_ArgumentListRef_t argumentListRef,
206  ///<
207  void* contextPtr
208  ///<
209 );
210 
211 //--------------------------------------------------------------------------------------------------
212 /**
213  * Handler for pushing data result.
214  */
215 //--------------------------------------------------------------------------------------------------
216 typedef void (*le_avdata_CallbackResultFunc_t)
217 (
218  le_avdata_PushStatus_t status,
219  ///<
220  void* contextPtr
221  ///<
222 );
223 
224 //--------------------------------------------------------------------------------------------------
225 /**
226  * Handler for AV session changes
227  */
228 //--------------------------------------------------------------------------------------------------
230 (
231  le_avdata_SessionState_t sessionState,
232  ///< Session started or stopped?
233  void* contextPtr
234  ///<
235 );
236 
237 
238 //--------------------------------------------------------------------------------------------------
239 /**
240  * Get if this client bound locally.
241  */
242 //--------------------------------------------------------------------------------------------------
243 LE_SHARED bool ifgen_le_avdata_HasLocalBinding
244 (
245  void
246 );
247 
248 
249 //--------------------------------------------------------------------------------------------------
250 /**
251  * Init data that is common across all threads
252  */
253 //--------------------------------------------------------------------------------------------------
254 LE_SHARED void ifgen_le_avdata_InitCommonData
255 (
256  void
257 );
258 
259 
260 //--------------------------------------------------------------------------------------------------
261 /**
262  * Perform common initialization and open a session
263  */
264 //--------------------------------------------------------------------------------------------------
265 LE_SHARED le_result_t ifgen_le_avdata_OpenSession
266 (
267  le_msg_SessionRef_t _ifgen_sessionRef,
268  bool isBlocking
269 );
270 
271 //--------------------------------------------------------------------------------------------------
272 /**
273  * Add handler function for EVENT 'le_avdata_ResourceEvent'
274  *
275  * Upon resource access on the server side, the registered handler is called.
276  *
277  * For "settings" (read/write), the same handler is called for both read and write access.
278  *
279  * For "commands", the handler function must call the "ReplyExecResult" function to send the command
280  * execution result back to the AVC daemon (which then sends the proper response back to the AV
281  * server).
282  */
283 //--------------------------------------------------------------------------------------------------
284 LE_SHARED le_avdata_ResourceEventHandlerRef_t ifgen_le_avdata_AddResourceEventHandler
285 (
286  le_msg_SessionRef_t _ifgen_sessionRef,
287  const char* LE_NONNULL path,
288  ///< [IN]
290  ///< [IN]
291  void* contextPtr
292  ///< [IN]
293 );
294 
295 //--------------------------------------------------------------------------------------------------
296 /**
297  * Remove handler function for EVENT 'le_avdata_ResourceEvent'
298  */
299 //--------------------------------------------------------------------------------------------------
300 LE_SHARED void ifgen_le_avdata_RemoveResourceEventHandler
301 (
302  le_msg_SessionRef_t _ifgen_sessionRef,
304  ///< [IN]
305 );
306 
307 //--------------------------------------------------------------------------------------------------
308 /**
309  * Create an asset data with the provided path. Note that asset data type and value are determined
310  * upon the first call to a Set function. When an asset data is created, it contains a null value,
311  * represented by the data type of none.
312  *
313  * @return:
314  * - LE_OK on success
315  * - LE_DUPLICATE if path has already been called by CreateResource before, or path is parent
316  * or child to an existing Asset Data path.
317  * - LE_FAULT on any other error.
318  */
319 //--------------------------------------------------------------------------------------------------
320 LE_SHARED le_result_t ifgen_le_avdata_CreateResource
321 (
322  le_msg_SessionRef_t _ifgen_sessionRef,
323  const char* LE_NONNULL path,
324  ///< [IN]
325  le_avdata_AccessMode_t accessMode
326  ///< [IN]
327 );
328 
329 //--------------------------------------------------------------------------------------------------
330 /**
331  * Sets the namespace for asset data.
332  *
333  * @return:
334  * - LE_OK on success
335  * - LE_BAD_PARAMETER if the namespace is unknown
336  */
337 //--------------------------------------------------------------------------------------------------
338 LE_SHARED le_result_t ifgen_le_avdata_SetNamespace
339 (
340  le_msg_SessionRef_t _ifgen_sessionRef,
341  le_avdata_Namespace_t _namespace
342  ///< [IN]
343 );
344 
345 //--------------------------------------------------------------------------------------------------
346 /**
347  * Sets an asset data to contain a null value, represented by the data type of none.
348  *
349  * @return:
350  * - LE_NOT_FOUND - if the path is invalid and does not point to an asset data
351  * - LE_NOT_PERMITTED - asset data being accessed does not have the right permission
352  * - LE_OK - access successful.
353  */
354 //--------------------------------------------------------------------------------------------------
355 LE_SHARED le_result_t ifgen_le_avdata_SetNull
356 (
357  le_msg_SessionRef_t _ifgen_sessionRef,
358  const char* LE_NONNULL path
359  ///< [IN]
360 );
361 
362 //--------------------------------------------------------------------------------------------------
363 /**
364  * Gets the integer value of an asset data.
365  *
366  * @return:
367  * - LE_BAD_PARAMETER - asset data being accessed is of the wrong data type
368  * - LE_UNAVAILABLE - asset data contains null value
369  * - LE_NOT_FOUND - if the path is invalid and does not point to an asset data
370  * - LE_NOT_PERMITTED - asset data being accessed does not have the right permission
371  * - LE_OK - access successful.
372  */
373 //--------------------------------------------------------------------------------------------------
374 LE_SHARED le_result_t ifgen_le_avdata_GetInt
375 (
376  le_msg_SessionRef_t _ifgen_sessionRef,
377  const char* LE_NONNULL path,
378  ///< [IN]
379  int32_t* valuePtr
380  ///< [OUT]
381 );
382 
383 //--------------------------------------------------------------------------------------------------
384 /**
385  * Sets an asset data to an integer value.
386  *
387  * @return:
388  * - LE_NOT_FOUND - if the path is invalid and does not point to an asset data
389  * - LE_NOT_PERMITTED - asset data being accessed does not have the right permission
390  * - LE_OK - access successful.
391  */
392 //--------------------------------------------------------------------------------------------------
393 LE_SHARED le_result_t ifgen_le_avdata_SetInt
394 (
395  le_msg_SessionRef_t _ifgen_sessionRef,
396  const char* LE_NONNULL path,
397  ///< [IN]
398  int32_t value
399  ///< [IN]
400 );
401 
402 //--------------------------------------------------------------------------------------------------
403 /**
404  * Gets the float value of an asset data.
405  *
406  * @return:
407  * - LE_BAD_PARAMETER - asset data being accessed is of the wrong data type
408  * - LE_UNAVAILABLE - asset data contains null value
409  * - LE_NOT_FOUND - if the path is invalid and does not point to an asset data
410  * - LE_NOT_PERMITTED - asset data being accessed does not have the right permission
411  * - LE_OK - access successful.
412  */
413 //--------------------------------------------------------------------------------------------------
414 LE_SHARED le_result_t ifgen_le_avdata_GetFloat
415 (
416  le_msg_SessionRef_t _ifgen_sessionRef,
417  const char* LE_NONNULL path,
418  ///< [IN]
419  double* valuePtr
420  ///< [OUT]
421 );
422 
423 //--------------------------------------------------------------------------------------------------
424 /**
425  * Sets an asset data to a float value.
426  *
427  * @return:
428  * - LE_NOT_FOUND - if the path is invalid and does not point to an asset data
429  * - LE_NOT_PERMITTED - asset data being accessed does not have the right permission
430  * - LE_OK - access successful.
431  */
432 //--------------------------------------------------------------------------------------------------
433 LE_SHARED le_result_t ifgen_le_avdata_SetFloat
434 (
435  le_msg_SessionRef_t _ifgen_sessionRef,
436  const char* LE_NONNULL path,
437  ///< [IN]
438  double value
439  ///< [IN]
440 );
441 
442 //--------------------------------------------------------------------------------------------------
443 /**
444  * Gets the bool value of an asset data.
445  *
446  * @return:
447  * - LE_BAD_PARAMETER - asset data being accessed is of the wrong data type
448  * - LE_UNAVAILABLE - asset data contains null value
449  * - LE_NOT_FOUND - if the path is invalid and does not point to an asset data
450  * - LE_NOT_PERMITTED - asset data being accessed does not have the right permission
451  * - LE_OK - access successful.
452  */
453 //--------------------------------------------------------------------------------------------------
454 LE_SHARED le_result_t ifgen_le_avdata_GetBool
455 (
456  le_msg_SessionRef_t _ifgen_sessionRef,
457  const char* LE_NONNULL path,
458  ///< [IN]
459  bool* valuePtr
460  ///< [OUT]
461 );
462 
463 //--------------------------------------------------------------------------------------------------
464 /**
465  * Sets an asset data to a bool value.
466  *
467  * @return:
468  * - LE_NOT_FOUND - if the path is invalid and does not point to an asset data
469  * - LE_NOT_PERMITTED - asset data being accessed does not have the right permission
470  * - LE_OK - access successful.
471  */
472 //--------------------------------------------------------------------------------------------------
473 LE_SHARED le_result_t ifgen_le_avdata_SetBool
474 (
475  le_msg_SessionRef_t _ifgen_sessionRef,
476  const char* LE_NONNULL path,
477  ///< [IN]
478  bool value
479  ///< [IN]
480 );
481 
482 //--------------------------------------------------------------------------------------------------
483 /**
484  * Gets the string value of an asset data.
485  *
486  * @return:
487  * - LE_BAD_PARAMETER - asset data being accessed is of the wrong data type
488  * - LE_UNAVAILABLE - asset data contains null value
489  * - LE_NOT_FOUND - if the path is invalid and does not point to an asset data
490  * - LE_NOT_PERMITTED - asset data being accessed does not have the right permission
491  * - LE_OVERFLOW - asset data length exceeds the maximum length
492  * - LE_OK - access successful
493  */
494 //--------------------------------------------------------------------------------------------------
495 LE_SHARED le_result_t ifgen_le_avdata_GetString
496 (
497  le_msg_SessionRef_t _ifgen_sessionRef,
498  const char* LE_NONNULL path,
499  ///< [IN]
500  char* value,
501  ///< [OUT]
502  size_t valueSize
503  ///< [IN]
504 );
505 
506 //--------------------------------------------------------------------------------------------------
507 /**
508  * Sets an asset data to a string value.
509  *
510  * @return:
511  * - LE_NOT_FOUND - if the path is invalid and does not point to an asset data
512  * - LE_NOT_PERMITTED - asset data being accessed does not have the right permission
513  * - LE_OK - access successful.
514  */
515 //--------------------------------------------------------------------------------------------------
516 LE_SHARED le_result_t ifgen_le_avdata_SetString
517 (
518  le_msg_SessionRef_t _ifgen_sessionRef,
519  const char* LE_NONNULL path,
520  ///< [IN]
521  const char* LE_NONNULL value
522  ///< [IN]
523 );
524 
525 //--------------------------------------------------------------------------------------------------
526 /**
527  * Get the bool argument with the specified name.
528  *
529  * @return:
530  * - LE_OK on success
531  * - LE_NOT_FOUND if argument doesn't exist, or its data type doesn't match the API.
532  */
533 //--------------------------------------------------------------------------------------------------
534 LE_SHARED le_result_t ifgen_le_avdata_GetBoolArg
535 (
536  le_msg_SessionRef_t _ifgen_sessionRef,
537  le_avdata_ArgumentListRef_t argumentListRef,
538  ///< [IN]
539  const char* LE_NONNULL argName,
540  ///< [IN]
541  bool* boolArgPtr
542  ///< [OUT]
543 );
544 
545 //--------------------------------------------------------------------------------------------------
546 /**
547  * Get the float argument with the specified name.
548  *
549  * @return:
550  * - LE_OK on success
551  * - LE_NOT_FOUND if argument doesn't exist, or its data type doesn't match the API.
552  */
553 //--------------------------------------------------------------------------------------------------
554 LE_SHARED le_result_t ifgen_le_avdata_GetFloatArg
555 (
556  le_msg_SessionRef_t _ifgen_sessionRef,
557  le_avdata_ArgumentListRef_t argumentListRef,
558  ///< [IN]
559  const char* LE_NONNULL argName,
560  ///< [IN]
561  double* floatArgPtr
562  ///< [OUT]
563 );
564 
565 //--------------------------------------------------------------------------------------------------
566 /**
567  * Get the int argument with the specified name.
568  *
569  * @return:
570  * - LE_OK on success
571  * - LE_NOT_FOUND if argument doesn't exist, or its data type doesn't match the API.
572  */
573 //--------------------------------------------------------------------------------------------------
574 LE_SHARED le_result_t ifgen_le_avdata_GetIntArg
575 (
576  le_msg_SessionRef_t _ifgen_sessionRef,
577  le_avdata_ArgumentListRef_t argumentListRef,
578  ///< [IN]
579  const char* LE_NONNULL argName,
580  ///< [IN]
581  int32_t* intArgPtr
582  ///< [OUT]
583 );
584 
585 //--------------------------------------------------------------------------------------------------
586 /**
587  * Get the string argument with the specified name.
588  *
589  * @return:
590  * - LE_OK on success
591  * - LE_NOT_FOUND if argument doesn't exist, or its data type doesn't match the API
592  * - LE_OVERFLOW - argument length exceeds the maximum length
593  */
594 //--------------------------------------------------------------------------------------------------
595 LE_SHARED le_result_t ifgen_le_avdata_GetStringArg
596 (
597  le_msg_SessionRef_t _ifgen_sessionRef,
598  le_avdata_ArgumentListRef_t argumentListRef,
599  ///< [IN]
600  const char* LE_NONNULL argName,
601  ///< [IN]
602  char* strArg,
603  ///< [OUT]
604  size_t strArgSize
605  ///< [IN]
606 );
607 
608 //--------------------------------------------------------------------------------------------------
609 /**
610  * Get the length (excluding terminating null byte) of the string argument of the specified name.
611  *
612  * @return:
613  * - LE_OK on success
614  * - LE_NOT_FOUND if argument doesn't exist, or its data type doesn't match the API.
615  */
616 //--------------------------------------------------------------------------------------------------
617 LE_SHARED le_result_t ifgen_le_avdata_GetStringArgLength
618 (
619  le_msg_SessionRef_t _ifgen_sessionRef,
620  le_avdata_ArgumentListRef_t argumentListRef,
621  ///< [IN]
622  const char* LE_NONNULL argName,
623  ///< [IN]
624  int32_t* strArgLenPtr
625  ///< [OUT]
626 );
627 
628 //--------------------------------------------------------------------------------------------------
629 /**
630  * Reply command execution result to AVC Daemon, which can then respond to AV server. This function
631  * MUST be called at the end of a command execution, in order for AV server to be notified about the
632  * execution status.
633  */
634 //--------------------------------------------------------------------------------------------------
635 LE_SHARED void ifgen_le_avdata_ReplyExecResult
636 (
637  le_msg_SessionRef_t _ifgen_sessionRef,
638  le_avdata_ArgumentListRef_t argumentListRef,
639  ///< [IN]
640  le_result_t result
641  ///< [IN]
642 );
643 
644 //--------------------------------------------------------------------------------------------------
645 /**
646  * Push asset data to the server.
647  *
648  * @return:
649  * - LE_OK on success
650  * - LE_NOT_FOUND if the provided path doesn't exist
651  * - LE_BUSY if push service is busy. Data added to queue list for later push
652  * - LE_OVERFLOW if data size exceeds the maximum allowed size
653  * - LE_NO_MEMORY if push queue is full, try again later
654  * - LE_FAULT on any other error
655  */
656 //--------------------------------------------------------------------------------------------------
657 LE_SHARED le_result_t ifgen_le_avdata_Push
658 (
659  le_msg_SessionRef_t _ifgen_sessionRef,
660  const char* LE_NONNULL path,
661  ///< [IN]
663  ///< [IN]
664  void* contextPtr
665  ///< [IN]
666 );
667 
668 //--------------------------------------------------------------------------------------------------
669 /**
670  * Push data dump to a specified path on the server.
671  *
672  * @return:
673  * - LE_OK on success
674  * - LE_BUSY if push service is busy. Data added to queue list for later push
675  * - LE_OVERFLOW if data size exceeds the maximum allowed size
676  * - LE_NO_MEMORY if push queue is full, try again later
677  * - LE_FAULT on any other error
678  */
679 //--------------------------------------------------------------------------------------------------
680 LE_SHARED le_result_t ifgen_le_avdata_PushStream
681 (
682  le_msg_SessionRef_t _ifgen_sessionRef,
683  const char* LE_NONNULL path,
684  ///< [IN]
685  int fd,
686  ///< [IN]
688  ///< [IN]
689  void* contextPtr
690  ///< [IN]
691 );
692 
693 //--------------------------------------------------------------------------------------------------
694 /**
695  * Create a timeseries record
696  *
697  * @return Reference to the record
698  */
699 //--------------------------------------------------------------------------------------------------
700 LE_SHARED le_avdata_RecordRef_t ifgen_le_avdata_CreateRecord
701 (
702  le_msg_SessionRef_t _ifgen_sessionRef
703 );
704 
705 //--------------------------------------------------------------------------------------------------
706 /**
707  * Delete a timeseries record
708  */
709 //--------------------------------------------------------------------------------------------------
710 LE_SHARED void ifgen_le_avdata_DeleteRecord
711 (
712  le_msg_SessionRef_t _ifgen_sessionRef,
713  le_avdata_RecordRef_t recordRef
714  ///< [IN]
715 );
716 
717 //--------------------------------------------------------------------------------------------------
718 /**
719  * Accumulate int data
720  *
721  * @note The client will be terminated if the recordRef is not valid, or the resource doesn't exist
722  *
723  * @return:
724  * - LE_OK on success
725  * - LE_NO_MEMORY if the current entry was NOT added because the time series buffer is full.
726  * - LE_FAULT on any other error
727  */
728 //--------------------------------------------------------------------------------------------------
729 LE_SHARED le_result_t ifgen_le_avdata_RecordInt
730 (
731  le_msg_SessionRef_t _ifgen_sessionRef,
732  le_avdata_RecordRef_t recordRef,
733  ///< [IN]
734  const char* LE_NONNULL path,
735  ///< [IN]
736  int32_t value,
737  ///< [IN]
738  uint64_t timestamp
739  ///< [IN]
740 );
741 
742 //--------------------------------------------------------------------------------------------------
743 /**
744  * Accumulate float data
745  *
746  * @note The client will be terminated if the recordRef is not valid, or the resource doesn't exist
747  *
748  * @return:
749  * - LE_OK on success
750  * - LE_NO_MEMORY if the current entry was NOT added because the time series buffer is full.
751  * - LE_FAULT on any other error
752  */
753 //--------------------------------------------------------------------------------------------------
754 LE_SHARED le_result_t ifgen_le_avdata_RecordFloat
755 (
756  le_msg_SessionRef_t _ifgen_sessionRef,
757  le_avdata_RecordRef_t recordRef,
758  ///< [IN]
759  const char* LE_NONNULL path,
760  ///< [IN]
761  double value,
762  ///< [IN]
763  uint64_t timestamp
764  ///< [IN]
765 );
766 
767 //--------------------------------------------------------------------------------------------------
768 /**
769  * Accumulate boolean data
770  *
771  * @note The client will be terminated if the recordRef is not valid, or the resource doesn't exist
772  *
773  * @return:
774  * - LE_OK on success
775  * - LE_NO_MEMORY if the current entry was NOT added because the time series buffer is full.
776  * - LE_FAULT on any other error
777  */
778 //--------------------------------------------------------------------------------------------------
779 LE_SHARED le_result_t ifgen_le_avdata_RecordBool
780 (
781  le_msg_SessionRef_t _ifgen_sessionRef,
782  le_avdata_RecordRef_t recordRef,
783  ///< [IN]
784  const char* LE_NONNULL path,
785  ///< [IN]
786  bool value,
787  ///< [IN]
788  uint64_t timestamp
789  ///< [IN]
790 );
791 
792 //--------------------------------------------------------------------------------------------------
793 /**
794  * Accumulate string data
795  *
796  * @note The client will be terminated if the recordRef is not valid, or the resource doesn't exist
797  *
798  * @return:
799  * - LE_OK on success
800  * - LE_NO_MEMORY if the current entry was NOT added because the time series buffer is full.
801  * - LE_FAULT on any other error
802  */
803 //--------------------------------------------------------------------------------------------------
804 LE_SHARED le_result_t ifgen_le_avdata_RecordString
805 (
806  le_msg_SessionRef_t _ifgen_sessionRef,
807  le_avdata_RecordRef_t recordRef,
808  ///< [IN]
809  const char* LE_NONNULL path,
810  ///< [IN]
811  const char* LE_NONNULL value,
812  ///< [IN]
813  uint64_t timestamp
814  ///< [IN]
815 );
816 
817 //--------------------------------------------------------------------------------------------------
818 /**
819  * Push record to the server
820  *
821  ** @return:
822  * - LE_OK on success
823  * - LE_BUSY if push service is busy. Data added to queue list for later push
824  * - LE_OVERFLOW if data size exceeds the maximum allowed size
825  * - LE_NO_MEMORY if push queue is full, try again later
826  * - LE_FAULT on any other error
827  *
828  * * @note If the caller is passing a bad pointer into this function, it is a fatal error, the
829  * function will not return.
830  */
831 //--------------------------------------------------------------------------------------------------
832 LE_SHARED le_result_t ifgen_le_avdata_PushRecord
833 (
834  le_msg_SessionRef_t _ifgen_sessionRef,
835  le_avdata_RecordRef_t recordRef,
836  ///< [IN]
838  ///< [IN]
839  void* contextPtr
840  ///< [IN]
841 );
842 
843 //--------------------------------------------------------------------------------------------------
844 /**
845  * Add handler function for EVENT 'le_avdata_SessionState'
846  *
847  * This event provides information on AV session state changes
848  */
849 //--------------------------------------------------------------------------------------------------
850 LE_SHARED le_avdata_SessionStateHandlerRef_t ifgen_le_avdata_AddSessionStateHandler
851 (
852  le_msg_SessionRef_t _ifgen_sessionRef,
854  ///< [IN]
855  void* contextPtr
856  ///< [IN]
857 );
858 
859 //--------------------------------------------------------------------------------------------------
860 /**
861  * Remove handler function for EVENT 'le_avdata_SessionState'
862  */
863 //--------------------------------------------------------------------------------------------------
864 LE_SHARED void ifgen_le_avdata_RemoveSessionStateHandler
865 (
866  le_msg_SessionRef_t _ifgen_sessionRef,
868  ///< [IN]
869 );
870 
871 //--------------------------------------------------------------------------------------------------
872 /**
873  * Request the avcServer to open a session.
874  *
875  * @return
876  * - SessionRef if session request succeeded
877  * - NULL if session request failed
878  */
879 //--------------------------------------------------------------------------------------------------
880 LE_SHARED le_avdata_RequestSessionObjRef_t ifgen_le_avdata_RequestSession
881 (
882  le_msg_SessionRef_t _ifgen_sessionRef
883 );
884 
885 //--------------------------------------------------------------------------------------------------
886 /**
887  * Request the avcServer to close a session.
888  *
889  */
890 //--------------------------------------------------------------------------------------------------
891 LE_SHARED void ifgen_le_avdata_ReleaseSession
892 (
893  le_msg_SessionRef_t _ifgen_sessionRef,
895  ///< [IN] Reference to a previously opened AV session.
896 );
897 /** @} **/
898 #endif // LE_AVDATA_COMMON_H_INCLUDE_GUARD
struct le_avdata_Record * le_avdata_RecordRef_t
Definition: le_avdata_common.h:158
le_avdata_DataType_t
Definition: le_avdata_common.h:105
#define LE_SHARED
Definition: le_basics.h:300
le_result_t
Definition: le_basics.h:46
AVMS session stopped.
Definition: le_avdata_common.h:178
Push was successful.
Definition: le_avdata_common.h:129
read(server) or read/write(client)
Definition: le_avdata_common.h:64
le_avdata_AccessMode_t
Definition: le_avdata_common.h:62
Push has failed.
Definition: le_avdata_common.h:131
Float Data Type.
Definition: le_avdata_common.h:111
struct le_avdata_ResourceEventHandler * le_avdata_ResourceEventHandlerRef_t
Definition: le_avdata_common.h:150
AVMS session started.
Definition: le_avdata_common.h:176
struct le_avdata_SessionStateHandler * le_avdata_SessionStateHandlerRef_t
Definition: le_avdata_common.h:189
le_avdata_PushStatus_t
Definition: le_avdata_common.h:127
void(* le_avdata_CallbackResultFunc_t)(le_avdata_PushStatus_t status, void *contextPtr)
Definition: le_avdata_common.h:217
struct le_msg_Session * le_msg_SessionRef_t
Definition: le_messaging.h:860
execute (server)
Definition: le_avdata_common.h:68
void(* le_avdata_ResourceHandlerFunc_t)(const char *LE_NONNULL path, le_avdata_AccessType_t accessType, le_avdata_ArgumentListRef_t argumentListRef, void *contextPtr)
Definition: le_avdata_common.h:200
Boolean Data Type.
Definition: le_avdata_common.h:113
struct le_avdata_RequestSessionObj * le_avdata_RequestSessionObjRef_t
Definition: le_avdata_common.h:166
Null Data Type.
Definition: le_avdata_common.h:107
read/write (server) or read/write (client)
Definition: le_avdata_common.h:66
void(* le_avdata_SessionStateHandlerFunc_t)(le_avdata_SessionState_t sessionState, void *contextPtr)
Definition: le_avdata_common.h:230
struct le_avdata_ArgumentList * le_avdata_ArgumentListRef_t
Definition: le_avdata_common.h:142
String Data Type.
Definition: le_avdata_common.h:115
le_avdata_SessionState_t
Definition: le_avdata_common.h:174
le_avdata_Namespace_t
Definition: le_avdata_common.h:90
Integer Data Type.
Definition: le_avdata_common.h:109