Write digital output🔗

Writes a value to an output channel in a remote I/O device.

The I/O subsystem shares connections to I/O servers. There will be only one connection to each server, identified by socketType, serverAddress and port. All tools with identical values will use the same socket connection. Consequences:

  • It is usually fine for a server implementation to support a single connected client only. This is what the reference implementation in the SDK does.

  • A connection may fail if a server supporting only one client is reached with a different identification triple. For example, if you use localhost as serverName in one tool and 127.0.0.1 in another, the I/O subsystem will try to establish two connections.

  • The first tool to initiate a connection will supply the password. You may thus notice that a password-protected connection works without a password in another tool. You shouldn’t rely on this unless you can guarantee tool execution order.

Inputs🔗

  • socketType: The type of the server socket to connect to. If set to NoSocket, no connection will be attempted.

  • serverAddress: The address of the server. If socketType is LocalSocket, serverAddress is the path to the socket, e.g /run/va-ioserver.sock. If socketType is TcpSocket or SslSocket, serverAddress is the internet host name of the server. TcpSocket also supports IP addresses (IPv4 and IPv6).

  • port: The TCP port number on the server. Only applicable to TCP and SSL sockets.

  • password: Server password. Depending on server configuration password may or may not be required.

  • channel: The zero-based index of the output channel to write.

  • value: The value to be written to the channel, commonly 0 or 1.