SightLine Applications Command, Control, and Script API  v3.3
List of all members
SLASetPortConfiguration_t Struct Reference

Description

Configure one of the communication ports for a specific protocol or mode.

typedef struct {
u8 port;
u8 baud;
u8 dataBits;
u8 stopBits;
u8 parity;
u8 maxPacket;
u8 maxDelay;
u8 protocol;
u16 inputPort;
u32be udpDestinationAddr;
u16 udpDestinationPort;
u16 udpAttNavPort;

Current setting can be retrieved using SLAGetPortConfiguration_t.
NOTE: It takes up to 10 seconds for Serial port settings to take effect. To see if the change was taken, wait for 10 seconds then use SLAGetPortConfiguration_t to retrieve the updated setting.

Port ID

Port ID Description
0 Serial port 0
1 Serial port 1
4 Serial port 2
6 Serial port 3 (3000/4000 only)
7 Serial port 4 (3000/4000 only)
9 Serial port 6 (4000 only)
10 Serial port 7 (4000 only)
11 ttySL0 device (4000 only)
15 Ethernet Port (for klv passthrough over Ethernet)

NOTE: All other values are reserved.

Baud Rate

Value Baud rate
0 4800
1 9600
2 38400
3 57600 (Default)
4 115200
5 19200
6 921600
7 2400
8 230400
9 460800

Protocol Type

Value Description
0 SLA protocol
1 Scan Eagle Aquarius packet parsing & SLA protocol
2 SLA protocol no telemetry
3 Reserved
4 Port not used (allows use by other applications)
5 TCP pass through
6 Raw pass through (direct pass through with no change)
7 KLV pass through
8 Serial-to-serial passthrough
9 NMEA parsing
10 reserved
11 reserved
12 reserved
13 reserved
14 reserved

SLA Protocol

Ports using this protocol type will accept SightLine Application commands(0x51 0xAC) specified in this document and may also generate telemetry data.

SLA Protocol No Telemetry

Ports using this protocol type will accept SightLine Application commands(0x51 0xAC) specified in this document and will not generate any telemetry data.

Port Not Used

Allows use by other applications running on the ARM process to access this serial port, or when Linux command line debugging is active.

TCP Pass Through

Creates a TCP socket that waits for a connection on the inputPort. Any data recieved is sent to the Serial Port. Any data received on the Serial Port is sent back out the TCP socket. udpDestinationAddr and udpDestinationPort are not used as these are handled by the TCP socket.

Raw Pass Through

A UDP socket is created to listend for any data recieced on inputPort, which is passed out the serial port. Any data received on the serial port is sent as a UDP packet to the IP address (udpDestinationAddr) at port (udpDestinationPort).

KLV Pass Through

KLV data received on serial or UDP receive port are injected into MPEG2-TS stream. KLV Passthrough receives formatted KLV metadata via serial port generated by an external processor. This KLV metadata is injected into the MPEG2-TS stream along with compressed digital video. When using this mode, internally-generated KLV metadata should be disabled via SLASetMetadataRate_t. See also SLASetKlvData_t, which allows users to set blocks of KLV data.

Serial-to-Serial Pass through

Serial-to-Serial sends output from one serial port to another serial port specified in Destination port number (udpDestinationPort, must be set to one of the Port ID values : 4 for Serial Port 2 for example). Maximum packet length, inbound port, destination IP and AttNav are ignored. By configuring two ports to output to each other, the two ports act like they are `piped' together.

NMEA Parsing

Any data received on the serial port is assumed to be NMEA 0183 compatible strings.The external device which generates the strings is connected to the serial port specified.The serial port is configured for the correct baud rate and other settings to match the sender (all Ethernet settings are ignored and can be set to zeros). Strings are parsed and converted to appropriate Metadata values. All other data is ignored. Please

See also
EAN-Ethernet-and-Serial-Communication.PDF for additional information.

Message ID 0x3E

Byte Offset Name Description
4portPort ID, see SLACommandPassThrough_t.destPort
5baudBaud rate
6dataBitsData bits
7stopBitsStop bits
8parityParity
9maxPacketMaximum packet length in bytes for input serial or network data
10maxDelayMaximum timeout in milliseconds when reading from a port; when timeout is complete, any received data is sent to the destination port
11protocolProtocol type.
12-13inputPortLocal inbound port number where UDP/TCP packets are expected. Ethernet port were all payload data will be received. Hardware opens a new socket to listen on this port. Must be greater than 0 (0 is reserved)
14-17udpDestinationAddrDestination IP address of host where Ethernet packets will be sent
18-19udpDestinationPortDestination port number (port number where host is listening). Hardware opens a new socket and sends data to the outbound destination IP Address at the destination port number. Must be greater than 0 (0 is reserved).
For Serial-to-Serial passthrough, this is the other port ID (4 for Serial Port 2 for example).
20-21udpAttNavPortAttNav port number. When set to a value other than zero, a network socket is created to listen on this port (defaults 65100) for ATTNAV packets. Any data received on this port is then sent on to the serial port defined. Only applies when Protocol Type is set to Scan Eagle Aquarius packet parsing & SLA protocol, this port is set to 65100. Requires that Destination IP address be NON - ZERO and Local inbound port number be NON - ZERO.