diff options
-rw-r--r-- | gpsd.c | 6 | ||||
-rw-r--r-- | gpsd.xml | 8 |
2 files changed, 9 insertions, 5 deletions
@@ -335,7 +335,7 @@ struct subscriber_t { bool tied; /* client set device with F */ bool watcher; /* is client in watcher mode? */ int raw; /* is client in raw mode? */ - enum {GPS,RTCM104v2,ANY} requires; /* type of device requested */ + enum {GPS,AIS,RTCM104v2,ANY} requires; /* type of device requested */ struct gps_fix_t fixbuffer; /* info to report to the client */ struct gps_fix_t oldfix; /* previous fix for error modeling */ enum {casoc=0, nocasoc=1} buffer_policy; /* buffering policy */ @@ -602,6 +602,8 @@ static bool allocation_filter(struct gps_device_t *channel, return true; else if (user->requires==RTCM104v2 && (channel->packet.type==RTCM2_PACKET)) return true; + else if (user->requires==AIS && (channel->packet.type==AIS_PACKET)) + return true; else if (user->requires == GPS && (channel->packet.type!=RTCM2_PACKET) && (channel->packet.type!=BAD_PACKET)) return true; @@ -1000,6 +1002,8 @@ static int handle_oldstyle(struct subscriber_t *sub, char *buf, int buflen) sub->requires = RTCM104v2; else if (strncasecmp(p, "gps", 3) == 0) sub->requires = GPS; + else if (strncasecmp(p, "ais", 3) == 0) + sub->requires = AIS; else sub->requires = ANY; p += strcspn(p, ",\r\n"); @@ -394,16 +394,16 @@ client was attached, and multiple devices were not supported.)</para> <varlistentry> <term>g</term> <listitem> -<para>With =, accepts a single argument which may have either of the -values 'gps' or 'rtcm104v2', with case ignored. This specifies the +<para>With =, accepts a single argument which may have any of the +values 'gps', 'ais', or 'rtcm104v2', with case ignored. This specifies the type of information the client wants and forces a device assignment. Without =, forces a device assignment but doesn't force the type. This command is optional; if it is not given, the client will be bound to whatever available device the daemon finds first.</para> <para>This command returns either '?' if no device of the specified -type(s) could be assigned, otherwise a string ('GPS' or 'RTCM104v2') -identifying the kind of information the attached device +type(s) could be assigned, otherwise a string ('GPS', 'AIS' or +'RTCM104v2') identifying the kind of information the attached device returns.</para> <para>(Earlier versions accepted 'RTCM104' and returned 'RTCM104' |