NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
Communication Line

Communication line component. More...

Data Structures

class  ICommunicationLine
 Communication line interface. More...
 
class  ICommunicationLineEvent
 Communication line events interface. More...
 

Enumerations

enum  Type {
  kType_UNK = 0, kType_SERIAL, kType_TCP_SERVER, kType_TCP_CLIENT,
  kType_UDP_SERVER, kType_UDP_CLIENT, kType_IPC_SERVER, kType_IPC_CLIENT,
  kType_USER
}
 Communication line type. More...
 
enum  Options {
  kOption_NOP, kOption_State, kOption_MessageRegex, kOption_Port ,
  kOption_SerialPort = kOption_Port, kOption_Host, kOption_LocalHost = kOption_Host, kOption_DestinationPort,
  kOption_RemotePort = kOption_DestinationPort, kOption_DestinationHost , kOption_BaudRate, kOption_ByteSize,
  kOption_Parity, kOption_StopBits, kOption_FlowCtrl, kOption_SockName,
  kOption_SockNamePort, kOption_SockNameAddr, kOption_SockNameNative, kOption_PeerName,
  kOption_PeerNamePort, kOption_PeerNameAddr, kOption_PeerNameNative, kOption_KeepAlive,
  kOption_KeepAliveIdle, kOption_KeepAliveCount, kOption_KeepAliveIntvl, kOption_Name ,
  kOption_FilterAddressv4, kOption_FilterAddressv6, kOption_MulticastHops, kOption_MulticastLoop,
  kOption_ReceiveBufferSize, kOption_SendBufferSize, kOption_MulticastSockName, kOption_MulticastSockNamePort,
  kOption_MulticastSockNameAddr, kOption_MulticastSockNameNative , kOption_TimerPeriod
}
 all possible options More...
 
enum  Options {
  kOption_NOP = communication_line::kOption_NOP, kOption_State = communication_line::kOption_State, kOption_MessageRegex = communication_line::kOption_MessageRegex, kOption_Port = communication_line::kOption_Port,
  kOption_Host = communication_line::kOption_Host, kOption_KeepAlive = communication_line::kOption_KeepAlive, kOption_KeepAliveIdle = communication_line::kOption_KeepAliveIdle, kOption_KeepAliveCount = communication_line::kOption_KeepAliveCount,
  kOption_KeepAliveIntvl = communication_line::kOption_KeepAliveIntvl, kOption_ReceiveBufferSize = communication_line::kOption_ReceiveBufferSize, kOption_SendBufferSize = communication_line::kOption_SendBufferSize
}
 TCP possible options. More...
 
enum  Options {
  kOption_NOP = communication_line::kOption_NOP, kOption_State = communication_line::kOption_State, kOption_MessageRegex = communication_line::kOption_MessageRegex, kOption_Port = communication_line::kOption_Port ,
  kOption_Host = communication_line::kOption_Host , kOption_DestinationPort = communication_line::kOption_DestinationPort , kOption_DestinationHost = communication_line::kOption_DestinationHost , kOption_SockName = communication_line::kOption_SockName,
  kOption_SockNamePort = communication_line::kOption_SockNamePort, kOption_SockNameAddr = communication_line::kOption_SockNameAddr, kOption_SockNameNative = communication_line::kOption_SockNameNative, kOption_PeerName = communication_line::kOption_PeerName,
  kOption_PeerNamePort = communication_line::kOption_PeerNamePort, kOption_PeerNameAddr = communication_line::kOption_PeerNameAddr, kOption_PeerNameNative = communication_line::kOption_PeerNameNative , kOption_FilterAddressv4 = communication_line::kOption_FilterAddressv4,
  kOption_FilterAddressv6 = communication_line::kOption_FilterAddressv6, kOption_MulticastHops = communication_line::kOption_MulticastHops, kOption_MulticastLoop = communication_line::kOption_MulticastLoop, kOption_ReceiveBufferSize = communication_line::kOption_ReceiveBufferSize,
  kOption_SendBufferSize = communication_line::kOption_SendBufferSize, kOption_MulticastSockName = communication_line::kOption_MulticastSockName, kOption_MulticastSockNamePort = communication_line::kOption_MulticastSockNamePort, kOption_MulticastSockNameAddr = communication_line::kOption_MulticastSockNameAddr,
  kOption_MulticastSockNameNative = communication_line::kOption_MulticastSockNameNative , kOption_TimerPeriod = communication_line::kOption_TimerPeriod
}
 UDP possible options. More...
 
enum  Options {
  kOption_NOP = communication_line::kOption_NOP, kOption_State = communication_line::kOption_State, kOption_MessageRegex = communication_line::kOption_MessageRegex, kOption_Port = communication_line::kOption_Port,
  kOption_BaudRate = communication_line::kOption_BaudRate, kOption_ByteSize = communication_line::kOption_ByteSize, kOption_Parity = communication_line::kOption_Parity, kOption_StopBits = communication_line::kOption_StopBits,
  kOption_FlowCtrl = communication_line::kOption_FlowCtrl
}
 COM port possible options. More...
 
enum  Options { kOption_NOP = communication_line::kOption_NOP, kOption_State = communication_line::kOption_State, kOption_MessageRegex = communication_line::kOption_MessageRegex, kOption_Name = communication_line::kOption_Name }
 IPC possible options. More...
 

Variables

static const char kLocalHostAddress [] = "127.0.0.1"
 Local host address.
 
static const sdk::ComponentId kCommunicationLineTcpServerCID = "CommunicationLine.Tcp.Server.CID"
 Communication line through TCP/IP connection: Server.
 
static const sdk::ComponentId kCommunicationLineTcpClientCID = "CommunicationLine.Tcp.Client.CID"
 Communication line through TCP/IP connection: Client.
 
static const sdk::ComponentId kCommunicationLineUdpCID = "CommunicationLine.Udp.CID"
 Communication line through UDP connection.
 
static const sdk::ComponentId & kCommunicationLineUdpServerCID = kCommunicationLineUdpCID
 Communication line through UDP connection: Server.
 
static const sdk::ComponentId & kCommunicationLineUdpClientCID = kCommunicationLineUdpCID
 Communication line through UDP connection: Client.
 
static const char kBroadcastAddress [] = "0.0.0.0"
 Broadcast address.
 
static const char kAnyHost [] = "0.0.0.0"
 Any host address.
 
static const SDKUInt16 kUndefinedPortnumber = 0
 Undefined port number.
 
static const sdk::ComponentId kCommunicationLineCommCID = "CommunicationLine.Comm.CID"
 Communication line through COM port connection.
 
static const sdk::ComponentId kCommunicationLineIpcServerCID = "CommunicationLine.Ipc.Server.CID"
 Communication line through a named pipe connection: Server.
 
static const sdk::ComponentId kCommunicationLineIpcClientCID = "CommunicationLine.Ipc.Client.CID"
 Communication line through a named pipe connection: Client.
 

Detailed Description

Communication line component.

Enumeration Type Documentation

◆ Type

enum Type

Communication line type.

Enumerator
kType_UNK 

Unknown type.

kType_SERIAL 

Comm (Serial)

kType_TCP_SERVER 

TCP.

kType_TCP_CLIENT 

TCP.

kType_UDP_SERVER 

UDP.

kType_UDP_CLIENT 

UDP.

kType_IPC_SERVER 

IPC(PIPE)

kType_IPC_CLIENT 

IPC(PIPE)

kType_USER 

User type.

◆ Options [1/5]

enum Options

all possible options

Enumerator
kOption_NOP 

No operation.

kOption_State 

Read only Bool: Running / Stopped.

kOption_MessageRegex 

String: A regular expression to split an input stream on sentences; e.g. "\$.+?\r\n" for NMEA sentence

kOption_Port 

String or integral: Data source port number.

kOption_SerialPort 

String: Port name
"COM1", "COM2" or "\\.\COM1","\\.\COM2" etc. (Windows)
"/dev/ttyS0", "/dev/ttyS1" etc. (Linux)
"/dev/ttyd0", "/dev/ttyd1" (or "/dev/ttyu0" from v8.0) (FreeBSD)
"/dev/ttya" "/dev/ttyb", "/dev/ttyc" etc. (Solaris)
"/dev/ttyf1", "/dev/ttyf2", "/dev/ttyf3" etc. (IRIX)
"/dev/tty1p0", "/dev/tty2p0", "/dev/tty3p0" etc. (HP-UX)
"/dev/tty01", "/dev/tty02", "/dev/tty03" etc. (Digital Unix)
Integral: Port number n (both Linux or Windows).
Port numbers enumerated starting from zero (correspondent to "COM1" or "/dev/ttyS0").

kOption_Host 

String: Data source host name or address.

kOption_LocalHost 

For multicast - defines the communication device interface.

kOption_DestinationPort 

String or integral: Data receiver port number.

kOption_RemotePort 

for muticast - defines the multicast group

kOption_DestinationHost 

String: Data receiver host name or address.

kOption_BaudRate 

Integral: Sets and returns the baud rate (1200, 4800, 9600 ...)

kOption_ByteSize 

Integral: Sets and returns the byte size (8 by default)

kOption_Parity 

Integral: 0 - no parity, 1 - parity odd, 2 - parity even.
Indicates whether parity checking is enabled.
If this member is non zero, parity checking is performed and errors are reported.

kOption_StopBits 

Integral: Number of stop bits. 0 - 1.5 bits, 1 - 1 bit, 2 - 2 bits

kOption_FlowCtrl 

The flow control settings 0 - none, 1 - software, 2 - hardware

kOption_SockName 

Socket name as it is returned by the 'getsockname' function
[R/O] String: Socket name in "192.168.1.101:2000" format for IPv4 protocol
or "[0123:4567:89AB:CDEF:0123:4567:89AB:CDEF]:2000" for IPv6

kOption_SockNamePort 

[R/O] String: Socket port number

kOption_SockNameAddr 

[R/O] String: Socket address

kOption_SockNameNative 

[R/O] Byte array: sockaddr struct as is.

kOption_PeerName 

Peer name as it returned by the 'getpeername' function
[R/O] String: Peer name in "192.168.1.101:2000" format for IPv4 protocol
or "[0123:4567:89AB:CDEF:0123:4567:89AB:CDEF]:2000" for IPv6

kOption_PeerNamePort 

[R/O] String: Peer port number

kOption_PeerNameAddr 

[R/O] String: Peer address

kOption_PeerNameNative 

[R/O] Byte array: sockaddr struct as is.

kOption_KeepAlive 

Boolean: On/Off.

kOption_KeepAliveIdle 

Integral: Seconds of idle traffic before the first probe is sent.

kOption_KeepAliveCount 

Integral: Number of probes to send before the connection is terminated.

kOption_KeepAliveIntvl 

Integral: Seconds between probes.

kOption_Name 

String:
(Windows) Named pipe name; looked like "\\.pipe\example_pipe"
(POSIX) Local socket file path; like "/tmp/example_fifo"

kOption_FilterAddressv4 

string

kOption_FilterAddressv6 

array ipv4 in network format

kOption_MulticastHops 

array ipv6 in network format

kOption_MulticastLoop 

time-to-live for multicast packets

kOption_ReceiveBufferSize 

Boolean: Allow the sender receive the sent packets.

kOption_SendBufferSize 

Integral: udp incoming buffer size.

kOption_MulticastSockName 

Integral: udp outgoing buffer size.

kOption_MulticastSockNamePort 

< [R/O] String: Socket port number

[R/O] String: Socket port number

kOption_MulticastSockNameAddr 

[R/O] String: Socket address

kOption_MulticastSockNameNative 

[R/O] Byte array: sockaddr struct as is.

kOption_TimerPeriod 

Boolean: Allow receiver to skip own packets.

◆ Options [2/5]

enum Options

TCP possible options.

Enumerator
kOption_NOP 

No operation.

kOption_State 

Read only Bool: Running / Stopped.

kOption_MessageRegex 

String: A regular expression to split
an input stream on sentences;
e.g. "\$.+?\r\n" for NMEA sentence

kOption_Port 

String or integral: Port number.

kOption_Host 

String: Host name.

kOption_KeepAlive 

Boolean: On/Off.

kOption_KeepAliveIdle 

Integral: Seconds of idle traffic before the first probe is sent.

kOption_KeepAliveCount 

Integral: Number of probes to send before the connection is terminated.

kOption_KeepAliveIntvl 

Integral: Seconds between probes.

kOption_ReceiveBufferSize 

Integral: incoming buffer size.

kOption_SendBufferSize 

Integral: outgoing buffer size.

◆ Options [3/5]

enum Options

UDP possible options.

Enumerator
kOption_NOP 

No operation.

kOption_State 

Read only Bool: Running / Stopped.

kOption_MessageRegex 

String: A regular expression to split
an input stream on sentences;
e.g. "\$.+?\r\n" for NMEA sentence

kOption_Port 

String or integral: Port number.

kOption_Host 

String: Data source host name or address.

kOption_DestinationPort 

String or integral: Data receiver port number.

kOption_DestinationHost 

String: Data receiver host name or address.

kOption_SockName 

Socket name as it returned by the 'getsockname' function
[R/O] String: Socket name in "192.168.1.101:2000" format for IPv4 protocol
or "[0123:4567:89AB:CDEF:0123:4567:89AB:CDEF]:2000" for IPv6

kOption_SockNamePort 

[R/O] String: Socket port number

kOption_SockNameAddr 

[R/O] String: Socket address

kOption_SockNameNative 

[R/O] Byte array: sockaddr struct as is.

kOption_PeerName 

Peer name as it returned by the 'getpeername' function
[R/O] String: Peer name in "192.168.1.101:2000" format for IPv4 protocol
or "[0123:4567:89AB:CDEF:0123:4567:89AB:CDEF]:2000" for IPv6

kOption_PeerNamePort 

[R/O] String: Peer port number

kOption_PeerNameAddr 

[R/O] String: Peer address

kOption_PeerNameNative 

[R/O] Byte array: sockaddr struct as is.

kOption_FilterAddressv4 

string

kOption_FilterAddressv6 

array ipv4 in network format

kOption_MulticastHops 

array ipv6 in network format

kOption_MulticastLoop 

number of hosts for multicast TTL

kOption_ReceiveBufferSize 

self sending allowing

kOption_SendBufferSize 

incoming buffer size

kOption_MulticastSockName 

outgoing buffer size

kOption_MulticastSockNamePort 

< [R/O] String: Socket port number

[R/O] String: Socket port number

kOption_MulticastSockNameAddr 

[R/O] String: Socket address

kOption_MulticastSockNameNative 

[R/O] Byte array: sockaddr struct as is.

kOption_TimerPeriod 

Boolean: Allow receiver to skip own packets.

◆ Options [4/5]

enum Options

COM port possible options.

Enumerator
kOption_NOP 

No operation.

kOption_State 

Read only Bool: Running / Stopped.

kOption_MessageRegex 

String: A regular expression to split
an input stream on sentences;
e.g. "\$.+?\r\n" for NMEA sentence

kOption_Port 

String: Port name
"COM1", "COM2" or "\\.\COM1","\\.\COM2" etc. (Windows)
"/dev/ttyS0", "/dev/ttyS1" etc. (Linux)
"/dev/ttyd0", "/dev/ttyd1" (or "/dev/ttyu0" from v8.0) (FreeBSD)
"/dev/ttya" "/dev/ttyb", "/dev/ttyc" etc. (Solaris)
"/dev/ttyf1", "/dev/ttyf2", "/dev/ttyf3" etc. (IRIX)
"/dev/tty1p0", "/dev/tty2p0", "/dev/tty3p0" etc. (HP-UX)
"/dev/tty01", "/dev/tty02", "/dev/tty03" etc. (Digital Unix)
Integral: Port number n (both Linux or Windows)
Port numbers enumerated starting from zero
(correspondent to "COM1" or "/dev/ttyS0")

kOption_BaudRate 

Integral: Sets and returns the baud rate (1200, 4800, 9600 ...)

kOption_ByteSize 

Integral: Sets and returns the byte size (8 by default)

kOption_Parity 

Integral: 0 - no parity, 1 - parity odd, 2 - parity even.
Indicates whether parity checking is enabled.
If this member is non zero, parity checking is performed and errors are reported.

kOption_StopBits 

0 - 1.5 bits, 1 - 1 bit, 2 - 2 bits

Integral: Number of stop bits.

kOption_FlowCtrl 

0 - none, 1 - software, 2 - hardware

The flow control settings.

◆ Options [5/5]

enum Options

IPC possible options.

Enumerator
kOption_NOP 

No operation.

kOption_State 

Read only Bool: Running / Stopped.

kOption_MessageRegex 

String: A regular expression to split
an input stream on sentences;
e.g. "\$.+?\r\n" for NMEA sentence

kOption_Name 

String:
(Windows) Named pipe name; looked like "\\.pipe\example_pipe"
(POSIX) Local socket file path; like "/tmp/example_fifo"