api papi: add alias for timestamp(datetime)/timedelta
[vpp.git] / src / vpp / api / vpe.api
index bd6b9d5..9531ea5 100644 (file)
@@ -19,7 +19,9 @@
     called through a shared memory interface. 
 */
 
-option version = "1.3.0";
+option version = "1.5.0";
+
+import "vpp/api/vpe_types.api";
 
 /* 
  * Note: API placement cleanup in progress
@@ -283,29 +285,16 @@ define get_next_index_reply
   u32 next_index;
 };
 
-enum log_level {
-  VPE_API_LOG_LEVEL_EMERG = 0,    /* emerg */
-  VPE_API_LOG_LEVEL_ALERT = 1,    /* alert */
-  VPE_API_LOG_LEVEL_CRIT = 2,     /* crit */
-  VPE_API_LOG_LEVEL_ERR = 3,      /* err  */
-  VPE_API_LOG_LEVEL_WARNING = 4,  /* warn */
-  VPE_API_LOG_LEVEL_NOTICE = 5,   /* notice */
-  VPE_API_LOG_LEVEL_INFO = 6,     /* info */
-  VPE_API_LOG_LEVEL_DEBUG = 7,    /* debug */
-  VPE_API_LOG_LEVEL_DISABLED = 8, /* disabled */
-};
-
 define log_dump {
   u32 client_index;
   u32 context;
-  f64 start_timestamp;
+  vl_api_timestamp_t start_timestamp;
 };
 
 define log_details {
   u32 context;
-  f64 timestamp_ticks;
+  vl_api_timestamp_t timestamp;
   vl_api_log_level_t level;
-  string timestamp [limit=24];
   string msg_class [limit=32];
   string message [limit=256];
 };
@@ -314,22 +303,70 @@ define log_details {
     @param client_index - opaque cookie to identify the sender
     @param context - sender context, to match reply w/ request
 */
-define show_vpe_system_time_ticks
+define show_vpe_system_time
 {
   u32 client_index;
   u32 context;
 };
 
-/** \brief Reply for show vpe system time ticks.
+/** \brief Reply for show vpe system time.
     @param context - sender context which was passed in the request
     @param retval - return value
-    @param vpe_system_time_ticks - the time in ticks of the host system.
+    @param vpe_system_time - the time in seconds since epoch of the host system.
 */
-define show_vpe_system_time_ticks_reply
+define show_vpe_system_time_reply
 {
   u32 context;
   i32 retval;
-  f64 vpe_system_time_ticks;
+  vl_api_timestamp_t vpe_system_time;
+};
+
+/** \brief f64 types are not standardized across the wire. Sense wire format in each direction by sending the f64 value 1.0.
+    @param client_index - opaque cookie to identify the sender
+    @param context - sender context, to match reply w/ request
+    @param f64_one - The constant of 1.0.  If you send a different value, expect an rv=VNET_API_ERROR_API_ENDIAN_FAILED.
+*/
+define get_f64_endian_value
+{
+  u32 client_index;
+  u32 context;
+  f64 f64_one [default=1.0];
+};
+
+/** \brief get_f64_endian_value reply message
+    @param context - sender context which was passed in the request
+    @param retval - return value - VNET_API_ERROR_API_ENDIAN_FAILED if f64_one != 1.0
+    @param f64_one_result - The value of 'f64 1.0'
+*/
+define get_f64_endian_value_reply
+{
+  u32 context;
+  u32 retval;
+  f64 f64_one_result;
+};
+
+/** \brief Verify f64 wire format by sending a value and receiving the value + 1.0
+    @param client_index - opaque cookie to identify the sender.
+    @param context - sender context, to match reply w/ request.
+    @param f64_value - The value you want to test.  Default: 1.0.
+*/
+define get_f64_increment_by_one
+{
+  u32 client_index;
+  u32 context;
+  f64 f64_value [default=1.0];
+};
+
+/** \brief get_f64_increment_by_one reply
+    @param client_index - opaque cookie to identify the sender.
+    @param context - sender context, to match reply w/ request.
+    @param f64_value - The input f64_value incremented by 1.0.
+*/
+define get_f64_increment_by_one_reply
+{
+  u32 context;
+  u32 retval;
+  f64 f64_value;
 };
 
 /*