Recorder

Recorder related API functions.

GHS.ghs_get_recorder_info(slot_id: str) tuple[str, str | None, str | None, str | None, str | None][source]

Determine type, name, serial number and firmware version information for a recorder.

The recorderType, recorderName, serialNumber and firmwareVersion parameters are UTF-8 encoded.

This method can be called by multiple connected clients at same time.

Parameters

slot_id – The slot containing the recorder

Returns

  • GHSReturnValue - API return status

  • recorder_type - The type of the recorder

  • recorder_name - The name of the recorder

  • serial_number - The serial number of the recorder

  • firmware_version - The firmware version of the recorder

GHS.ghs_get_recorder_enabled(slot_id: str) tuple[str, str | None][source]

Determine if recorder is enabled or disabled.

This method can be called by multiple connected clients at same time.

Parameters

slot_id – The slot containing the recorder

Returns

  • GHSReturnValue - API return status

  • GHSEnableDisable - The recorder enabled status

GHS.ghs_set_recorder_enabled(slot_id: str, enabled: str | int) str[source]

Enable or disable a recorder.

The system needs to be idle before calling this function.

This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • enabled – Set to GHS_Enable/GHS_Disable to enable/disable

Returns

  • GHSReturnValue - API return status

GHS.ghs_get_channel_count(slot_id: str) tuple[str, int | None][source]

Retrieve the number of channels for a recorder.

This method can be called by multiple connected clients at same time.

Parameters

slot_id – The slot containing the recorder

Returns

  • GHSReturnValue - API return status

  • channel_count - The number of channels for the recorder

GHS.ghs_get_sample_rate(slot_id: str) tuple[str, float | None][source]

Determine the sample rate for a recorder.

This method can be called by multiple connected clients at same time.

Parameters

slot_id – The slot containing the recorder

Returns

  • GHSReturnValue - API return status

  • sample_rate - in samples per second

GHS.ghs_set_sample_rate(slot_id: str, sample_rate: float) str[source]

Set the sample rate for a recorder.

The system needs to be idle before calling this function. This function overwrites any previously set sample rate setting for the specified recorder. If the specified sample rate is not supported by the recorder, the sample rate is rounded to the nearest supported sample rate.

This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • sample_rate – In samples per second.

Returns

  • GHSReturnValue - API return status

GHS.ghs_get_digital_output(slot_id: str, digital_output: str | int) tuple[str, str | None][source]

Retrieve the Digital Output Mode for a specified Output ID in a recorder.

This method can be called by multiple connected clients at same time.

Parameters
  • slot_id – The slot containing the recorder

  • digital_output – The output number desired.

Returns

  • GHSReturnValue - API return status

  • GHSDigitalOutMode - The digital output mode for that output

GHS.ghs_set_digital_output(slot_id: str, digital_output: str | int, digital_output_mode: str | int) str[source]

Set the Digital Output Mode for a specified Output ID in a recorder.

This method will only process requests from the connected client with the most privileges order (Privileges order: 1- Perception, 2- GenDaq, 3- Other)

Parameters
  • slot_id – The slot containing the recorder

  • digital_output – The output number desired.

  • digital_output_mode – The digital output mode to set

Returns

  • GHSReturnValue - API return status

Accepted values:

  • slot_id - e.g. ‘A’ for the first slot

  • enabled - “Enable”, “Disable”

  • digital_output - “Output1”, “Output2”

  • digital_output_mode - “Low”, “High”, “Acquiring”, “Trigger”, “Alarm”