Commit 59d96e50 authored by Claes Sjofors's avatar Claes Sjofors

Xtt remote struct display, typ net_sTime added

parent 7d88aba2
...@@ -734,6 +734,11 @@ static int add_element( t_ctx ctx, ...@@ -734,6 +734,11 @@ static int add_element( t_ctx ctx,
type = pwr_eType_RefId; type = pwr_eType_RefId;
size = sizeof(pwr_tRefId); size = sizeof(pwr_tRefId);
} }
else if ( strcmp( line_elem[0], "net_sTime") == 0)
{
type = 10004; /* xnav_eType_NetTime */
size = 2 * sizeof(pwr_tInt32);
}
else else
{ {
undefined = 1; undefined = 1;
......
...@@ -975,6 +975,17 @@ void XNav::attrvalue_to_string( int type_id, pwr_tTid tid, void *value_ptr, ...@@ -975,6 +975,17 @@ void XNav::attrvalue_to_string( int type_id, pwr_tTid tid, void *value_ptr,
*len = snprintf( str, size, "%s", timstr); *len = snprintf( str, size, "%s", timstr);
break; break;
} }
case xnav_eType_NetTime: {
pwr_tTime t;
t.tv_sec = ((net_sTime *)value_ptr)->tv_sec;
t.tv_nsec = ((net_sTime *)value_ptr)->tv_nsec;
sts = time_AtoAscii( &t, time_eFormat_DateAndTime,
timstr, sizeof(timstr));
if ( EVEN(sts))
strcpy( timstr, "Undefined time");
*len = snprintf( str, size, "%s", timstr);
break;
}
case xnav_eType_GdbNodeFlags: { case xnav_eType_GdbNodeFlags: {
if ( ((gdb_mNode *)value_ptr)->b.up) if ( ((gdb_mNode *)value_ptr)->b.up)
*len = sprintf( str, "Up"); *len = sprintf( str, "Up");
......
...@@ -150,7 +150,8 @@ typedef enum { ...@@ -150,7 +150,8 @@ typedef enum {
xnav_eType_GdbNodeFlags = 10000, xnav_eType_GdbNodeFlags = 10000,
xnav_eType_Empty = 10001, xnav_eType_Empty = 10001,
xnav_eType_FixStr = 10002, xnav_eType_FixStr = 10002,
xnav_eType_ShortTime = 10003 xnav_eType_ShortTime = 10003,
xnav_eType_NetTime = 10004
} xnav_eType; } xnav_eType;
typedef enum { typedef enum {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment