UART Endpoint

A UART is a “Universal Asynchronous Receiver/Transmitter. Many times referred to as a COM (communication), Serial, or TTY (teletypewriter) port.

The UART Class allows the enabling and disabling of the UART data lines.

See the UART Entity for generic information.

PUT /api/v1/brainstem/(serial_num)/uart/(index)/enable

Enable the UART channel.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (boolean) –

    Boolean value to set.

    May be specified as a boolean, integer, or a string (formatted as “True”, “FALSE”, “1”, etc.)

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/enable

Get the enabled state of the uart.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (boolean) – Value formatted as a boolean

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/uart/(index)/baudrate

Set the UART baud rate.

If zero, automatic baud rate selection is used.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    32-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/baudrate

Get the UART baud rate.

If zero, automatic baud rate selection is used.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/uart/(index)/protocol

Set the UART protocol.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/protocol

Get the UART protocol.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/uart/(index)/linkchannel

Set the index of another UART Entity that should be linked to this UART.

If set to the index of this entity, the channel will not be linked.

If set to the index of another UART entity, data will be sent between the two UART entities with no additional processing.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/linkchannel

Gets the index of the UART Entity that this entity is linked to.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/uart/(index)/stopbits

Set the UART stop bit configuration

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/stopbits

Set the UART stop bit configuration

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/uart/(index)/parity

Set the UART parity.

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/parity

Get the UART parity.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/uart/(index)/databits

Set the number of bits per character

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/databits

Get the number of bits per character

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

PUT /api/v1/brainstem/(serial_num)/uart/(index)/flowcontrol

Set the UART flow control configuration

See JSON Schema for Request Object and Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Request JSON Object:
  • value (integer) –

    8-bit Integer value to set.

    May be specified as an integer or a string (formatted as “123”, “0x12”, etc.)

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/flowcontrol

Set the UART flow control configuration

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/capableprotocols

Returns a bitmask containing a list of protocols that this UART entity is allowed to select.

This does not guarantee that selecting a protocol with “setProtocol” will have an available resource.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value

GET /api/v1/brainstem/(serial_num)/uart/(index)/availableprotocols

Returns a bitmask containing a list of protocols that this UART entity is capable of selecting, and has an available protocol resource to assign.

See JSON Schema for Response Object

Parameters:
  • serial_num – Serial Number of device to access. Formatted as a hex string (e.g. “0x1234ABCD’). Optional on embedded REST server.

  • index – Index of entity to access. Default is 0.

Response JSON Object:
  • response.value (integer) – Value formatted as an integer

  • response.rawValue (integer) – Unformatted value