Clock Endpoint

Provides an interface to a real-time clock entity on a BrainStem module.

The clock entity may be used to get and set the real time of the system.

The clock entity has a one second resolution.

See the Clock Entity for generic information.

GET /api/v1/brainstem/(serial_num)/clock/(index)/year

Get the four digit year value (0-4095).

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)/clock/(index)/year

Set the four digit year value (0-4095).

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) –

    16-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)/clock/(index)/month

Get the two digit month value (1-12).

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)/clock/(index)/month

Set the two digit month value (1-12).

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)/clock/(index)/day

Get the two digit day of month value (1-28, 29, 30 or 31 depending on the month).

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)/clock/(index)/day

Set the two digit day of month value (1-28, 29, 30 or 31 depending on the month).

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)/clock/(index)/hour

Get the two digit hour value (0-23).

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)/clock/(index)/hour

Set the two digit hour value (0-23).

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)/clock/(index)/minute

Get the two digit minute value (0-59).

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)/clock/(index)/minute

Set the two digit minute value (0-59).

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)/clock/(index)/second

Get the two digit second value (0-59).

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)/clock/(index)/second

Set the two digit second value (0-59).

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