Programmatic Interface - I/O Commands |
These commands allow control over Input and Output streams over Serial ports, TCP or UDP connections. The NetRS has four serial ports, which are always defined. In addition, you can define TCP protcol or UDP protocol ports that can provide services over the Ethernet or over a PPP connection on a serial port. Port Configuration Parameters are available for adjusting the characteristics of the ports.
For those commands that require the specification of an I/O port, these three parameter formats are allowed:
port=SerialPortX | where X is 1, 2, 3 or 4. | |
port=TcpPortXXXX | where XXXX is between 1024 and 65535. | |
port=UdpPortXXXX | where XXXX is between 1024 and 65535. |
Each ports can be assigned a Service, such as PPP or RT17 data streaming, The service determines what sort of data stream or protocol will be configured on the port. Each service has a set of Service Configuration Parameters that allow configuration of the specific characteristics of that service.
The following commands are available for controlling I/O Ports:
Port Configuration Parameters
This command returns a multi-line response describing all active
IOports. The list will include:
Parameters:
No parameters are available.
Response:
This command produces a multi-line response that contains a complete
listing of all defined I/O ports and their setup parameters.
Parameters:
No parameters are available.
Response:
This command returns a description of an individual I/O port and
its setup parameters. The format is the same as a single IOport line
in the Show IOports command.
Parameters:
Service Configuration Parameters
List of all commands
Programmatic Overview
Show IOstatus
For each active port, the type of data service is indicated. For TCP
and UDP ports, the IP address of the remote system is also shown.
<Show IOstatus>
IOport name=SerialPort2 service=met
IOport name=SerialPort3 service=rt17
IOport name=TcpPort9999 service=rt17 remoteIP=192.168.142.7
<end of Show IOstatus>
Port Configuration Parameters
Service Configuration Parameters
Show IOports
<Show IOports>
IOport port=SerialPort1 service=ppp baud=115200 flow=None
localIP=1.1.1.1 remoteIP=1.1.1.2 connection=Direct
IOport port=SerialPort2 service=Met
cmd1=60:0102P9 cmd2=off cmd3=off cmd4=off cmd5=off cmd6=off
baud=57600 parity=None flow=None
IOport port=SerialPort3 service=ppp baud=115200 flow=None
localIP=192.168.0.1 remoteIP=192.168.0.30 connection=Direct
IOport port=SerialPort4 service=ppp baud=2400 flow=None
localIP=192.168.0.1 remoteIP=192.168.0.40
connection=Modem
reset=Reset init1=Init1 init2=init2 init3=intit3
IOport port=TcpPort5020 service=Ephemerides
IOport port=TcpPort5021 service=Almanacs
IOport port=TcpPort5022 service=SvStatus
IOport port=TcpPort9999 service=RT17 interval=1 measurements=yes
positions=no concise=yes iodeslips=no GPSdata=no rawGPS=no
rawWAAS=no smoothCode=no smoothCarrier=no
<end of Show IOports>
Port Configuration Parameters
Service Configuration Parameters
Show IOport
port=portName | The port for which data is requested. The name must be of the form:
|
Response:
IOport port=TcpPort9999 service=RT17 interval=1 measurements=yes positions=no concise=yes iodeslips=no GPSdata=no rawGPS=no rawWAAS=no smoothCode=no smoothCarrier=no
This command is used to create or modify the settings of an I/O port. The port is specified with a 'port=' parameter. Each port is assigned a "service" type, describing what type of data or activity is desired on the port. Depending on the service, numerous other parameters are available to customize the service.
Parameters:
port=portName | The port for which data is requested. The name must be of the form:
|
|||||||||
If the port is a SerialPort or a UdpPort, then other Port Configuration Parameters must be supplied. | ||||||||||
service=ServiceName |
Defines the type of activity desired on this port.
|
|||||||||
The remaining parameters are dependent on the type of service selected. Click on the service links above to see which parameters are appropriate for the desired service. |
Response:
OK: IOport port=TcpPort9999 service=RT17 interval=1 measurements=yes positions=no concise=yes iodeslips=no GPSdata=no rawGPS=no rawWAAS=no smoothCode=no smoothCarrier=no
This command deactivates a specified port and removes its definition from the NetRS.
Only TCP and UDP ports can be deleted. To deactivate a Serial port stream, use 'Set IOport' to set its service type to PPP.
Parameters:
port=portName | The port to be deleted. The name must be of the form:
|
||||||
all=yes | Deletes ALL TCP and UDP ports. |
Responses:
OK: IOport portName is deleted. OK: All TCP and UDP IOports have been deleted.
This command returns the current parameters defining the Reference Station setup. These values are used by CMR or RTCM output streams.
Note that two forms of response are possible, selected by the optional 'style' parameter. If Style is 'llh' then Latitude, Longitude and Height will be sent for the reference station position. If Style is 'xyz' then the position will be sent using ECEF coordinates X, Y and Z.
Parameters:
style=llh | Style is either 'llh' (Lat/Lon/Height), or 'xyz'. Controls the format in which the reference station position is returned. If not specified, the default is 'llh'. |
Response:
RefStation lat=37.388923181 lon=-122.036700958 height=1.234500 RtcmId=20 CmrId=21 Name='Rtcm2' Description='A Descriptive Phrase' RefStation x=-2691513.5954 y=-4301188.9436 z=3851777.1431 RtcmId=20 CmrId=21 Name='Rtcm2' Description='A Descriptive Phrase'
This command modifies the settings for the Reference Station. These values are used by CMR or RTCM output streams.
Parameters:
lat=37.388923181 | Reference station Latitude in decimal degrees. |
lon=-122.036700958 | Reference station Longitude in decimal degrees. |
height=234.567 | Reference station Height above sea level in meters. |
x=-2691513.5954 | Reference station ECEF X coordinate in meters. |
y=-4301188.9436 | Reference station ECEF Y coordinate in meters. |
z=3851777.1431 | Reference station ECEF Z coordinate in meters. |
rtcmid=20 | RTCM numeric identifier. Maximum value is 1023. |
cmrid=21 | CMR numeric identifier. Maximum value is 31. |
name=Rtcm2 | RTCM station name. Use single-quotes around the name if it contains spaces. |
description='A verbose string' | RTCM station description. Use single-quotes around the string if it contains spaces. |
Response:
OK: RefStation lat=37.388923181 lon=-122.036700958 height=1.234500 RtcmId=20 CmrId=21 Name='Rtcm2' Description='A verbose string' OK: RefStation x=-2691513.5954 y=-4301188.9436 z=3851777.1431 RtcmId=20 CmrId=21 Name='Rtcm2' Description='A verbose string'
The three types of Input/Output Ports each have their own unique characteristics. These characteristics must be specified when creating or modifying a port, using parameters to the Set Port command.
Parameters:
port=SerialPortX | The Serial Port. |
baud=38400 | The bit transmission rate. Acceptable values are:
|
parity=none | Parity can be one of:
|
flow=none | Flow control can be one of.
FlowControl is a required parameter on all Serial Ports except SerialPort1. XonXoff flow control is not supported on SerialPorts running the PPP service. |
Parameters:
port=TcpPortXXXX | The TCP Port . |
Parameters:
port=UdpPortXXXX | The UDP Port . |
udpTimeout=60 | The maximum time that is allowed between received KeepAlive packets
before a UDP connection is cancelled.
If this parameter is not specified in a Set Port command, the udpTimeout defaults to 10 seconds. |
Every defined Serial, TCP or UDP port is associated with a service, which defines how the port will behave, what data it will stream, etc. Some services are only supported on specific port types. May optional parameters are only appropriate for specific services. The table below summarizes each service type and provides a link to a section that gives a complete description of the parameters associated with that service.
PPP | Point to Point Protocol.
Implements a TCP/IP protocol over a serial port. Only available on Serial Ports. |
RT17 |
A Streaming protocol containing raw GPS measurements and other data.
Available on all port types. |
Binex |
A Streaming protocol containing raw GPS measurements and other data.
Available on all port types. |
RTCM |
A Streaming protocol containing GPS differential corrections.
Available on all port types. |
CMR |
A Streaming protocol containing GPS carrier phase measurements for use
in RTK systems.
Available on all port types. |
Met |
A protocol for interacting with external environmental sensors.
Only available on serial ports. |
Ephemerides |
A query service that responds with a complete binary dump of the
GPS ephemeris data.
Only available on TCP ports. |
Almanacs |
A query service that responds with a complete binary dump of the
GPS almanac data.
Only available on TCP ports. |
SvStatus |
A query service that responds with a binary dump of
Satellite status information.
Only available on TCP ports. |
Trimcom |
An interactive command protocol for use in remote control systems.
Only available on TCP ports. This protocol is deprecated and should not be used for new designs. |
This service implements a TCP/IP interface over a serial port. It is only available on Serial Ports. The parameters available for this port allow configuration of the serial port characteristics, modem interface commands, and the parameters needed for PPP itself.
Note that the Serial Port control parameters for PPP ports are a limited subset of the normal values available on serial ports.
Parameters:
port=SerialPortName | The serial port to use | ||||
service=PPP | The service assigned to this port. | ||||
baud=38400 | The bit transmission rate. Acceptable values are:
|
||||
flow=none | Flow control can be one of.
FlowControl is a required parameter on all Serial Ports except SerialPort1. XonXoff flow control is not supported on SerialPorts running the PPP service. |
||||
localIP=192.168.0.1 | The IP address used on the NetRS end of the PPP link. | ||||
remoteIP=192.168.0.20 | The IP address used on the remote end of the PPP link. | ||||
connection=modem | The type of connection protocol used by the PPP system.
|
||||
init1=InitString
init2=InitString init3=InitString reset=ResetString |
These parameters define initialization and reset strings used by the PPP system when interacting with a Modem, that is, when the Connection parameter is 'modem'. They are not allowed when Connection is 'direct'. The strings cannot have embedded spaces. |
RT17 is a Streaming protocol containing raw GPS measurements and other data. This service is available on all port types.
Parameters:
port=PortName | The IOport to use. RT17 streaming is is supported on all port types. | |||||||||||||||
service=RT17 | The service assigned to this port. | |||||||||||||||
interval=10 |
This is the interval (in seconds) between measurement and/or position
records in the stream. Valid values are:
|
|||||||||||||||
measurements=yes | 'Yes' or 'no' to indicate whether GPS measurement records should be included in the stream. This defaults to 'yes' if not specified. | |||||||||||||||
positions=no | 'Yes' or 'no' to indicate whether GPS position records should be included in the stream. This defaults to 'no' if not specified. | |||||||||||||||
concise=no | 'Yes' or 'no' to indicate whether the concise (compressed) format should be used. This defaults to 'no' if not specified. | |||||||||||||||
iodeslips=no | 'Yes' or 'no' to indicate whether records should be included containing satellite IODE values and cycle slip counts. This defaults to 'no' if not specified. | |||||||||||||||
gpsdata=no | 'Yes' or 'no' to indicate whether records should be included containing decoded GPS satellite data. This defaults to 'no' if not specified. | |||||||||||||||
rawgps=no | 'Yes' or 'no' to indicate whether records should be included containing raw GPS satellite data. This defaults to 'no' if not specified. | |||||||||||||||
rawwaas=no | 'Yes' or 'no' to indicate whether records should be included containing raw GPS satellite data. This defaults to 'no' if not specified. | |||||||||||||||
smoothcarrier=no | 'Yes' or 'no' to indicate whether GPS carrier phase measurements should be smoothed. This defaults to 'no' if not specified. | |||||||||||||||
smoothcode=no | 'Yes' or 'no' to indicate whether GPS code phase measurements should be smoothed. This defaults to 'no' if not specified. |
Binex is a streaming protocol containing raw GPS measurements and other data. This service is available on all port types.
Parameters:
port=PortName | The IOport to use. Binex streaming is is supported on all port types. | |||||||||||||||
service=Binex | The service to assign to this port. | |||||||||||||||
interval=10 |
This is the interval (in seconds) between measurement and/or position
records in the stream. Valid values are:
|
|||||||||||||||
smoothing=no | 'Yes' or 'no' to indicate whether code and carrier phase measurements should be smoothed. |
A Streaming protocol containing GPS differential corrections. Available on all port types.
Parameters:
port=PortName | The IOport to use. RTCM streaming is is supported on all port types. | ||||||||
service=RTCM | The service to assign to this port. | ||||||||
version=2.3 | Indictes which version of the RTCM standard should be use for this
stream. Possible values are:
|
||||||||
style=dgps | Describes an application, which implies the types of records to be
transmitted. Possible values are:
|
A Streaming protocol containing GPS carrier phase measurements for use
in RTK systems.
Available on all port types.
Parameters:
port=PortName | The IOport to use. RTCM streaming is is supported on all port types. |
service=CMR | The service to assign to this port. |
style=standard | Selects from two styles of CMR format. Value is either 'standard' or 'CmrPlus'. |
A protocol for interacting with external environmental sensors.
Only available on serial ports.
Parameters:
port=SerialPortName | The serial port to use. |
service=met | The service to assign to this port. |
cmd1=once:0102P0
cmd2=60:0102P9 cmd3=off .. cmd6=off |
Cmd1 through Cmd6 are the encoded commands to be sent to the external
sensors over the serial port. Each command is formatted as
time:stringand consists of a timing specification and a command string, separated by a colon, ' : '. The timing specification indicates the time interval (in minutes) between sendings of the command string. The time can be '0' or 'once' to indicate that the command should be activated once-only whenever a new data logging session is started. Inactive commands are set to "off" instead of a 'time:string'. |
A query service that responds with a complete binary dump of the GPS ephemeris data. This service is only available on TCP ports.
Parameters:
port=TcpPortXXXX | The TCP port to use for this service. |
service=ephemerides | The service to assign to this port. |
There are no other configuration parameters for this service. |
A query service that responds with a complete binary dump of the GPS almanac data. This service is only available on TCP ports.
Parameters:
port=SerialPortName | The serial port to use |
service=almanacs | The service to assign to this port. |
There are no other configuration parameters for this service. |
A query service that responds with a binary dump of satellite status information. This service is only available on TCP ports.
Parameters:
port=SerialPortName | The serial port to use |
service=svstatus | The service to assign to this port. |
There are no other configuration parameters for this service. |
An interactive command protocol for use in remote control systems. This service is only available on TCP ports.
Parameters:
port=SerialPortName | The serial port to use |
service=trimcom | The service to assign to this port. |
There are no other configuration parameters for this service. |