@synnaxlabs/client 0.57.0 → 0.57.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","names":[],"sources":["../src/ethercat/types.gen.ts","../src/ethercat/external.ts","../src/http/types.gen.ts","../src/http/external.ts","../src/labjack/types.gen.ts","../src/labjack/external.ts","../src/modbus/types.gen.ts","../src/modbus/external.ts","../src/ni/types.gen.ts","../src/ni/external.ts","../src/opcua/types.gen.ts","../src/opcua/external.ts","../src/pagerduty/types.gen.ts","../src/pagerduty/external.ts"],"sourcesContent":["// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id, zod } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** PDOAddress addresses a PDO entry explicitly in the CoE object dictionary. */\nexport const pdoAddressZ = z.object({\n /** index is the CoE object dictionary index of the PDO entry. */\n index: zod.uint16.default(0),\n /** subIndex is the CoE object dictionary sub-index of the PDO entry. */\n subIndex: zod.uint8.default(0),\n /** bitLength is the size of the PDO entry, in bits. */\n bitLength: zod.uint8.default(16),\n /** dataType is the data type of the PDO entry. */\n dataType: z.string().default(\"uint16\"),\n});\nexport interface PDOAddress extends z.infer<typeof pdoAddressZ> {}\n\n/** BaseReadChannel carries the fields every EtherCAT read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** device is the key of the slave device the channel reads from. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every EtherCAT write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** device is the key of the slave device the channel writes to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** AutomaticReadChannel resolves its PDO address from the slave's discovered PDOs. */\nexport const automaticReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"automatic\"),\n /** pdo is the name of the PDO entry to resolve on the slave. */\n pdo: z.string().default(\"\"),\n});\nexport interface AutomaticReadChannel extends z.infer<typeof automaticReadChannelZ> {}\n\n/** ManualReadChannel specifies its PDO address inline. */\nexport const manualReadChannelZ = baseReadChannelZ.extend(pdoAddressZ.shape).extend({\n type: z.literal(\"manual\"),\n});\nexport interface ManualReadChannel extends z.infer<typeof manualReadChannelZ> {}\n\nexport const READ_CHANNEL_TYPES = [\"automatic\", \"manual\"] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single EtherCAT read channel (TxPDO, slave to master). The type\n * field selects how the PDO entry is addressed.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n automaticReadChannelZ,\n manualReadChannelZ,\n]);\nexport type ReadChannel = AutomaticReadChannel | ManualReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n automatic: automaticReadChannelZ,\n manual: manualReadChannelZ,\n};\n\n/** AutomaticWriteChannel resolves its PDO address from the slave's discovered PDOs. */\nexport const automaticWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"automatic\"),\n /** pdo is the name of the PDO entry to resolve on the slave. */\n pdo: z.string().default(\"\"),\n});\nexport interface AutomaticWriteChannel extends z.infer<typeof automaticWriteChannelZ> {}\n\n/** ManualWriteChannel specifies its PDO address inline. */\nexport const manualWriteChannelZ = baseWriteChannelZ.extend(pdoAddressZ.shape).extend({\n type: z.literal(\"manual\"),\n});\nexport interface ManualWriteChannel extends z.infer<typeof manualWriteChannelZ> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"automatic\", \"manual\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single EtherCAT write channel (RxPDO, master to slave). The type\n * field selects how the PDO entry is addressed.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n automaticWriteChannelZ,\n manualWriteChannelZ,\n]);\nexport type WriteChannel = AutomaticWriteChannel | ManualWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n automatic: automaticWriteChannelZ,\n manual: manualWriteChannelZ,\n};\n\nexport const readConfigZ = task.readConfigZ.extend({\n channels: readChannelZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.persistConfigZ.extend({\n stateRate: z.number().default(25),\n executionRate: z.number().default(1000),\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/ethercat/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TIME_FORMATS = [\n \"iso8601\",\n \"unix_sec\",\n \"unix_ms\",\n \"unix_us\",\n \"unix_ns\",\n] as const;\nexport const timeFormatZ = z.enum(TIME_FORMATS);\nexport type TimeFormat = z.infer<typeof timeFormatZ>;\n\nexport const METHODS = [\n \"GET\",\n \"HEAD\",\n \"POST\",\n \"PUT\",\n \"DELETE\",\n \"PATCH\",\n \"OPTIONS\",\n \"TRACE\",\n \"CONNECT\",\n] as const;\nexport const methodZ = z.enum(METHODS);\nexport type Method = z.infer<typeof methodZ>;\n\nexport const JSON_TYPES = [\"number\", \"string\", \"boolean\"] as const;\nexport const jsonTypeZ = z.enum(JSON_TYPES);\nexport type JSONType = z.infer<typeof jsonTypeZ>;\n\nexport const GENERATOR_TYPES = [\"uuid\", \"timestamp\"] as const;\nexport const generatorTypeZ = z.enum(GENERATOR_TYPES);\nexport type GeneratorType = z.infer<typeof generatorTypeZ>;\n\n/** Header is a single HTTP header sent with a request. */\nexport const headerZ = z.object({\n /** name is the header name, unique within a request. */\n name: z.string().default(\"\"),\n /** value is the header value. */\n value: z.string().default(\"\"),\n});\nexport interface Header extends z.infer<typeof headerZ> {}\n\n/** QueryParam is a single URL query parameter sent with a request. */\nexport const queryParamZ = z.object({\n /** parameter is the parameter name, unique within a request. */\n parameter: z.string().default(\"\"),\n /** value is the parameter value. */\n value: z.string().default(\"\"),\n});\nexport interface QueryParam extends z.infer<typeof queryParamZ> {}\n\n/**\n * EnumEntry maps a string label in a JSON body to a numeric channel value for\n * enum-style parsing (e.g. \"ON\" -> 1, \"OFF\" -> 0).\n */\nexport const enumEntryZ = z.object({\n /** label is the string label in the JSON body. */\n label: z.string().default(\"\"),\n /** value is the numeric channel value the label maps to. */\n value: z.number().default(0),\n});\nexport interface EnumEntry extends z.infer<typeof enumEntryZ> {}\n\n/** BaseWriteField carries the fields every write body field shares. */\nexport const baseWriteFieldZ = z.object({\n /** key uniquely identifies the field within the endpoint. */\n key: z.string().default(id.create),\n /** pointer is the JSON Pointer where the value is placed in the body. */\n pointer: z.string().default(\"\"),\n});\nexport interface BaseWriteField extends z.infer<typeof baseWriteFieldZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** ReadField is a single value extracted from an endpoint's JSON response. */\nexport const readFieldZ = z.object({\n /** key uniquely identifies the field within the endpoint. */\n key: z.string().default(id.create),\n /** name is the human-readable field name. */\n name: z.string().default(\"\"),\n /** disabled is true when the field is excluded from polling. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel the extracted value is written to. */\n channel: channel.keyZ.default(0),\n /** pointer is the JSON Pointer to the value within the response body. */\n pointer: z.string().default(\"\"),\n /** dataType is the data type of the extracted value. */\n dataType: z.string().default(\"float64\"),\n /**\n * timeFormat is the encoding of the JSON value when the target channel holds\n * timestamps. Required for timestamp channels.\n */\n timeFormat: timeFormatZ.optional(),\n /** enumValues maps string labels in the response to numeric channel values. */\n enumValues: enumEntryZ.array().default(() => []),\n});\nexport interface ReadField extends z.infer<typeof readFieldZ> {}\n\n/** ChannelField is the command channel value placed into a write endpoint's body. */\nexport const channelFieldZ = z.object({\n /**\n * pointer is the JSON Pointer where the channel value is placed in the body. An empty\n * pointer sends the bare value as the entire body, in which case the endpoint may not\n * declare any additional fields.\n */\n pointer: z.string().default(\"\"),\n /** jsonType is the JSON type the channel value is serialized as. */\n jsonType: jsonTypeZ.default(\"number\"),\n /** channel is the Synnax command channel that triggers the request. */\n channel: channel.keyZ.default(0),\n /** name is the human-readable name of the command channel. */\n name: z.string().default(\"\"),\n /** dataType is the data type of the command channel. */\n dataType: z.string().default(\"float64\"),\n /**\n * timeFormat is the output encoding when the command channel holds timestamps.\n * Required for timestamp channels.\n */\n timeFormat: timeFormatZ.optional(),\n /**\n * enumValues maps numeric channel values to string labels. Only valid when json_type\n * is 'string'.\n */\n enumValues: enumEntryZ.array().default(() => []),\n});\nexport interface ChannelField extends z.infer<typeof channelFieldZ> {}\n\n/** StaticWriteField places a fixed value in the request body. */\nexport const staticWriteFieldZ = baseWriteFieldZ.extend({\n type: z.literal(\"static\"),\n /** jsonType is the JSON type the value is serialized as. */\n jsonType: jsonTypeZ.default(\"number\"),\n /** value is the fixed JSON value placed at the pointer. */\n value: z.unknown(),\n});\nexport interface StaticWriteField extends z.infer<typeof staticWriteFieldZ> {}\n\n/** GeneratedWriteField places a freshly generated UUID or timestamp in the body. */\nexport const generatedWriteFieldZ = baseWriteFieldZ.extend({\n type: z.literal(\"generated\"),\n /** generator is the generator that produces a fresh value per request. */\n generator: generatorTypeZ.default(\"uuid\"),\n /**\n * timeFormat is the output encoding for timestamp generators. Defaults to iso8601.\n */\n timeFormat: timeFormatZ.optional(),\n});\nexport interface GeneratedWriteField extends z.infer<typeof generatedWriteFieldZ> {}\n\nexport const WRITE_FIELD_TYPES = [\"static\", \"generated\"] as const;\nexport const writeFieldTypeZ = z.enum(WRITE_FIELD_TYPES);\nexport type WriteFieldType = z.infer<typeof writeFieldTypeZ>;\n\n/**\n * WriteField is an additional body field on a write endpoint. The type field selects\n * whether the value is fixed or generated per request.\n */\nexport const writeFieldZ = z.discriminatedUnion(\"type\", [\n staticWriteFieldZ,\n generatedWriteFieldZ,\n]);\nexport type WriteField = StaticWriteField | GeneratedWriteField;\n\nexport const WRITE_FIELD_SCHEMAS: {\n [K in WriteFieldType]: z.ZodType<Extract<WriteField, { type: K }>>;\n} = {\n static: staticWriteFieldZ,\n generated: generatedWriteFieldZ,\n};\n\n/** ReadEndpoint is a single HTTP endpoint polled by a read task. */\nexport const readEndpointZ = z.object({\n /** key uniquely identifies the endpoint within the task. */\n key: z.string().default(id.create),\n /** method is the HTTP method used to poll the endpoint. */\n method: methodZ.default(\"GET\"),\n /** path is the URL path appended to the device's base URL. */\n path: z.string().default(\"\"),\n /** headers contains additional headers merged into the request. */\n headers: headerZ.array().default(() => []),\n /** queryParams contains query parameters appended to the request URL. */\n queryParams: queryParamZ.array().default(() => []),\n /** body is a static body sent with each request. Empty sends no body. */\n body: z.string().default(\"\"),\n /** fields contains the values to extract from the response. */\n fields: readFieldZ.array().default(() => []),\n /**\n * index is the key of the field whose channel indexes the others. Empty when the task\n * stamps samples on arrival.\n */\n index: z.string().default(\"\"),\n});\nexport interface ReadEndpoint extends z.infer<typeof readEndpointZ> {}\n\n/** WriteEndpoint is a single HTTP endpoint written to by a write task. */\nexport const writeEndpointZ = z.object({\n /** key uniquely identifies the endpoint within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the endpoint is excluded from the task. */\n disabled: z.boolean().default(false),\n /** method is the HTTP method used to send the request. */\n method: methodZ.default(\"POST\"),\n /** path is the URL path appended to the device's base URL. */\n path: z.string().default(\"\"),\n /** headers contains additional headers merged into the request. */\n headers: headerZ.array().default(() => []),\n /** queryParams contains query parameters appended to the request URL. */\n queryParams: queryParamZ.array().default(() => []),\n /** channel is the command channel whose writes trigger this endpoint. */\n channel: channelFieldZ.prefault({}),\n /** fields contains additional static or generated body fields. */\n fields: writeFieldZ.array().default(() => []),\n});\nexport interface WriteEndpoint extends z.infer<typeof writeEndpointZ> {}\n\nexport const readConfigZ = task.persistConfigZ.extend({\n device: device.keyZ.default(\"\"),\n rate: z.number().default(1),\n endpoints: readEndpointZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.startConfigZ.extend({\n device: device.keyZ.default(\"\"),\n endpoints: writeEndpointZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/http/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TEMPERATURE_UNITS = [\"C\", \"F\", \"K\"] as const;\nexport const temperatureUnitsZ = z.enum(TEMPERATURE_UNITS);\nexport type TemperatureUnits = z.infer<typeof temperatureUnitsZ>;\n\nexport const THERMOCOUPLE_TYPES = [\n \"J\",\n \"K\",\n \"N\",\n \"R\",\n \"S\",\n \"T\",\n \"B\",\n \"E\",\n \"C\",\n] as const;\nexport const thermocoupleTypeZ = z.enum(THERMOCOUPLE_TYPES);\nexport type ThermocoupleType = z.infer<typeof thermocoupleTypeZ>;\n\n/** BaseReadChannel carries the fields every LabJack read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from (e.g. 'AIN0', 'DIO4'). */\n port: z.string().default(\"\"),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every LabJack write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to (e.g. 'DAC0', 'DIO4'). */\n port: z.string().default(\"\"),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ.extend({\n tcpScanMultiplier: z.int32().default(10),\n});\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** LinearScale maps raw values to engineering units with a slope and offset. */\nexport const linearScaleZ = z.object({\n type: z.literal(\"linear\"),\n /** slope is the multiplier applied to the raw value. */\n slope: z.number().default(1),\n /** offset is the offset added after scaling. */\n offset: z.number().default(0),\n});\nexport interface LinearScale extends z.infer<typeof linearScaleZ> {}\n\n/** MapScale maps a raw range linearly onto a scaled range. */\nexport const mapScaleZ = z.object({\n type: z.literal(\"map\"),\n /** preScaledMin is the lower bound of the raw input range. */\n preScaledMin: z.number().default(0),\n /** preScaledMax is the upper bound of the raw input range. */\n preScaledMax: z.number().default(1),\n /** scaledMin is the lower bound of the scaled output range. */\n scaledMin: z.number().default(0),\n /** scaledMax is the upper bound of the scaled output range. */\n scaledMax: z.number().default(1),\n});\nexport interface MapScale extends z.infer<typeof mapScaleZ> {}\n\n/** NoneScale applies no scaling; the raw value is used directly. */\nexport const noneScaleZ = z.object({\n type: z.literal(\"none\"),\n});\nexport interface NoneScale extends z.infer<typeof noneScaleZ> {}\n\nexport const SCALE_TYPES = [\"linear\", \"map\", \"none\"] as const;\nexport const scaleTypeZ = z.enum(SCALE_TYPES);\nexport type ScaleType = z.infer<typeof scaleTypeZ>;\n\n/** Scale determines how raw sensor values are transformed to engineering units. */\nexport const scaleZ = z.discriminatedUnion(\"type\", [\n linearScaleZ,\n mapScaleZ,\n noneScaleZ,\n]);\nexport type Scale = LinearScale | MapScale | NoneScale;\n\nexport const SCALE_SCHEMAS: {\n [K in ScaleType]: z.ZodType<Extract<Scale, { type: K }>>;\n} = {\n linear: linearScaleZ,\n map: mapScaleZ,\n none: noneScaleZ,\n};\n\n/** AnalogWriteChannel drives an analog output on a DAC port. */\nexport const analogWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"analog\"),\n port: z.string().default(\"DAC0\"),\n});\nexport interface AnalogWriteChannel extends z.infer<typeof analogWriteChannelZ> {}\n\n/** DigitalWriteChannel drives a digital output line on a DIO port. */\nexport const digitalWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"digital\"),\n port: z.string().default(\"DIO4\"),\n});\nexport interface DigitalWriteChannel extends z.infer<typeof digitalWriteChannelZ> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"analog\", \"digital\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single LabJack write channel. The type field selects the output\n * mode.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n analogWriteChannelZ,\n digitalWriteChannelZ,\n]);\nexport type WriteChannel = AnalogWriteChannel | DigitalWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n analog: analogWriteChannelZ,\n digital: digitalWriteChannelZ,\n};\n\n/** AnalogReadChannel reads a voltage from an analog input port. */\nexport const analogReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"analog\"),\n port: z.string().default(\"AIN0\"),\n /** range is the upper bound of the voltage input range, in Volts. */\n range: z.number().default(10),\n /**\n * negChan is the negative channel for differential readings on T7 devices. 199\n * selects single-ended.\n */\n negChan: z.int32().default(199),\n /** scale is the scale applied to raw samples after acquisition. */\n scale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface AnalogReadChannel extends z.infer<typeof analogReadChannelZ> {}\n\n/** DigitalReadChannel reads a digital input line. */\nexport const digitalReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"digital\"),\n port: z.string().default(\"DIO4\"),\n});\nexport interface DigitalReadChannel extends z.infer<typeof digitalReadChannelZ> {}\n\n/** ThermocoupleReadChannel reads temperature from a thermocouple. */\nexport const thermocoupleReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"thermocouple\"),\n /** port is the AIN port the thermocouple's positive lead is wired to. */\n port: z.string().default(\"AIN0\"),\n /** thermocoupleType selects the thermocouple alloy type. */\n thermocoupleType: thermocoupleTypeZ.default(\"K\"),\n /**\n * negChan is the AIN port of the thermocouple's negative lead on T7 devices. 199\n * selects single-ended.\n */\n negChan: z.int32().default(199),\n /**\n * cjcSource selects the cold-junction-compensation source: the device sensor\n * ('TEMPERATURE_DEVICE_K'), ambient air ('TEMPERATURE_AIR_K'), or an AIN port (e.g.\n * 'AIN2').\n */\n cjcSource: z.string().default(\"TEMPERATURE_DEVICE_K\"),\n /** cjcSlope is the CJC voltage-to-temperature slope, in Kelvin per Volt. */\n cjcSlope: z.number().default(1),\n /** cjcOffset is the CJC temperature offset, in Kelvins. */\n cjcOffset: z.number().default(0),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"K\"),\n /** scale is the scale applied to raw samples after acquisition. */\n scale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface ThermocoupleReadChannel extends z.infer<\n typeof thermocoupleReadChannelZ\n> {}\n\nexport const READ_CHANNEL_TYPES = [\"analog\", \"digital\", \"thermocouple\"] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single LabJack read channel. The type field selects the input mode\n * and the fields that accompany it.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n analogReadChannelZ,\n digitalReadChannelZ,\n thermocoupleReadChannelZ,\n]);\nexport type ReadChannel =\n AnalogReadChannel | DigitalReadChannel | ThermocoupleReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n analog: analogReadChannelZ,\n digital: digitalReadChannelZ,\n thermocouple: thermocoupleReadChannelZ,\n};\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n stateRate: z.number().default(10),\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n\nexport const readConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: readChannelZ.array().default(() => []),\n deviceScanBacklogWarnOnCount: z.uint32().default(0),\n ljmScanBacklogWarnOnCount: z.uint32().default(0),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/labjack/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id, zod } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** RegisterValue interprets one or more 16-bit registers as a single typed value. */\nexport const registerValueZ = z.object({\n /** dataType is the data type the register contents are interpreted as. */\n dataType: z.string().default(\"uint8\"),\n /** bytesSwapped is true when the byte order within each 16-bit word is swapped. */\n bytesSwapped: z.boolean().default(false),\n /** wordsSwapped is true when the word order of multi-register values is swapped. */\n wordsSwapped: z.boolean().default(false),\n});\nexport interface RegisterValue extends z.infer<typeof registerValueZ> {}\n\n/** BaseReadChannel carries the fields every Modbus read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that samples are written to. */\n channel: channel.keyZ.default(0),\n /** address is the Modbus address the channel reads from. */\n address: zod.uint16.default(0),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every Modbus write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel commands are read from. */\n channel: channel.keyZ.default(0),\n /** address is the Modbus address the channel writes to. */\n address: zod.uint16.default(0),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** CoilReadChannel reads a single bit from a coil. */\nexport const coilReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"coil\"),\n});\nexport interface CoilReadChannel extends z.infer<typeof coilReadChannelZ> {}\n\n/** DiscreteInputReadChannel reads a single bit from a discrete input. */\nexport const discreteInputReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"discrete_input\"),\n});\nexport interface DiscreteInputReadChannel extends z.infer<\n typeof discreteInputReadChannelZ\n> {}\n\n/**\n * HoldingRegisterReadChannel reads a typed value from one or more holding registers.\n */\nexport const holdingRegisterReadChannelZ = baseReadChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"holding_register\"),\n /** stringLength is the length, in characters, when data_type is a string. */\n stringLength: z.int32().default(0),\n });\nexport interface HoldingRegisterReadChannel extends z.infer<\n typeof holdingRegisterReadChannelZ\n> {}\n\n/** InputRegisterReadChannel reads a typed value from one or more input registers. */\nexport const inputRegisterReadChannelZ = baseReadChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"input_register\"),\n /** stringLength is the length, in characters, when data_type is a string. */\n stringLength: z.int32().default(0),\n });\nexport interface InputRegisterReadChannel extends z.infer<\n typeof inputRegisterReadChannelZ\n> {}\n\nexport const READ_CHANNEL_TYPES = [\n \"coil\",\n \"discrete_input\",\n \"holding_register\",\n \"input_register\",\n] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single Modbus read channel. The type field selects the register\n * space the channel reads from and the fields that accompany it.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n coilReadChannelZ,\n discreteInputReadChannelZ,\n holdingRegisterReadChannelZ,\n inputRegisterReadChannelZ,\n]);\nexport type ReadChannel =\n | CoilReadChannel\n | DiscreteInputReadChannel\n | HoldingRegisterReadChannel\n | InputRegisterReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n coil: coilReadChannelZ,\n discrete_input: discreteInputReadChannelZ,\n holding_register: holdingRegisterReadChannelZ,\n input_register: inputRegisterReadChannelZ,\n};\n\n/** CoilWriteChannel writes a single bit to a coil. */\nexport const coilWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"coil\"),\n});\nexport interface CoilWriteChannel extends z.infer<typeof coilWriteChannelZ> {}\n\n/**\n * HoldingRegisterWriteChannel writes a typed value to one or more holding registers.\n */\nexport const holdingRegisterWriteChannelZ = baseWriteChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"holding_register\"),\n });\nexport interface HoldingRegisterWriteChannel extends z.infer<\n typeof holdingRegisterWriteChannelZ\n> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"coil\", \"holding_register\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single Modbus write channel. The type field selects the register\n * space the channel writes to and the fields that accompany it.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n coilWriteChannelZ,\n holdingRegisterWriteChannelZ,\n]);\nexport type WriteChannel = CoilWriteChannel | HoldingRegisterWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n coil: coilWriteChannelZ,\n holding_register: holdingRegisterWriteChannelZ,\n};\n\nexport const readConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: readChannelZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/modbus/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TERMINAL_CONFIGS = [\n \"Cfg_Default\",\n \"RSE\",\n \"NRSE\",\n \"Diff\",\n \"PseudoDiff\",\n] as const;\nexport const terminalConfigZ = z.enum(TERMINAL_CONFIGS);\nexport type TerminalConfig = z.infer<typeof terminalConfigZ>;\n\nexport const EXCITATION_SOURCES = [\"Internal\", \"External\", \"None\"] as const;\nexport const excitationSourceZ = z.enum(EXCITATION_SOURCES);\nexport type ExcitationSource = z.infer<typeof excitationSourceZ>;\n\nexport const BRIDGE_CONFIGS = [\"FullBridge\", \"HalfBridge\", \"QuarterBridge\"] as const;\nexport const bridgeConfigZ = z.enum(BRIDGE_CONFIGS);\nexport type BridgeConfig = z.infer<typeof bridgeConfigZ>;\n\nexport const ELECTRICAL_UNITS = [\"mVoltsPerVolt\", \"VoltsPerVolt\"] as const;\nexport const electricalUnitsZ = z.enum(ELECTRICAL_UNITS);\nexport type ElectricalUnits = z.infer<typeof electricalUnitsZ>;\n\nexport const RESISTANCE_CONFIGS = [\"2Wire\", \"3Wire\", \"4Wire\"] as const;\nexport const resistanceConfigZ = z.enum(RESISTANCE_CONFIGS);\nexport type ResistanceConfig = z.infer<typeof resistanceConfigZ>;\n\nexport const Z_INDEX_PHASES = [\n \"AHighBHigh\",\n \"AHighBLow\",\n \"ALowBHigh\",\n \"ALowBLow\",\n] as const;\nexport const zIndexPhaseZ = z.enum(Z_INDEX_PHASES);\nexport type ZIndexPhase = z.infer<typeof zIndexPhaseZ>;\n\nexport const UNITS = [\n \"Volts\",\n \"Amps\",\n \"DegF\",\n \"DegC\",\n \"DegR\",\n \"Kelvins\",\n \"Strain\",\n \"Ohms\",\n \"Hz\",\n \"Seconds\",\n \"Meters\",\n \"Inches\",\n \"Degrees\",\n \"Radians\",\n \"g\",\n \"MetersPerSecondSquared\",\n \"Newtons\",\n \"Pounds\",\n \"KilogramForce\",\n \"PoundsPerSquareInch\",\n \"Bar\",\n \"Pascals\",\n \"VoltsPerVolt\",\n \"mVoltsPerVolt\",\n \"NewtonMeters\",\n \"InchPounds\",\n \"InchOunces\",\n \"FootPounds\",\n] as const;\nexport const unitsZ = z.enum(UNITS);\nexport type Units = z.infer<typeof unitsZ>;\n\nexport const ACCEL_SENSITIVITY_UNITS = [\"mVoltsPerG\", \"VoltsPerG\"] as const;\nexport const accelSensitivityUnitsZ = z.enum(ACCEL_SENSITIVITY_UNITS);\nexport type AccelSensitivityUnits = z.infer<typeof accelSensitivityUnitsZ>;\n\nexport const ACCEL_UNITS = [\n \"g\",\n \"MetersPerSecondSquared\",\n \"InchesPerSecondSquared\",\n] as const;\nexport const accelUnitsZ = z.enum(ACCEL_UNITS);\nexport type AccelUnits = z.infer<typeof accelUnitsZ>;\n\nexport const FORCE_UNITS = [\"Newtons\", \"Pounds\", \"KilogramForce\"] as const;\nexport const forceUnitsZ = z.enum(FORCE_UNITS);\nexport type ForceUnits = z.infer<typeof forceUnitsZ>;\n\nexport const SHUNT_RESISTOR_LOCATIONS = [\"Default\", \"Internal\", \"External\"] as const;\nexport const shuntResistorLocationZ = z.enum(SHUNT_RESISTOR_LOCATIONS);\nexport type ShuntResistorLocation = z.infer<typeof shuntResistorLocationZ>;\n\nexport const FORCE_SENSITIVITY_UNITS = [\"mVoltsPerNewton\", \"mVoltsPerPound\"] as const;\nexport const forceSensitivityUnitsZ = z.enum(FORCE_SENSITIVITY_UNITS);\nexport type ForceSensitivityUnits = z.infer<typeof forceSensitivityUnitsZ>;\n\nexport const PRESSURE_UNITS = [\"PoundsPerSquareInch\", \"Pascals\", \"Bar\"] as const;\nexport const pressureUnitsZ = z.enum(PRESSURE_UNITS);\nexport type PressureUnits = z.infer<typeof pressureUnitsZ>;\n\nexport const TORQUE_UNITS = [\n \"NewtonMeters\",\n \"InchOunces\",\n \"InchPounds\",\n \"FootPounds\",\n] as const;\nexport const torqueUnitsZ = z.enum(TORQUE_UNITS);\nexport type TorqueUnits = z.infer<typeof torqueUnitsZ>;\n\nexport const TEMPERATURE_UNITS = [\"DegC\", \"DegF\", \"Kelvins\", \"DegR\"] as const;\nexport const temperatureUnitsZ = z.enum(TEMPERATURE_UNITS);\nexport type TemperatureUnits = z.infer<typeof temperatureUnitsZ>;\n\nexport const RTD_TYPES = [\n \"Pt3750\",\n \"Pt3851\",\n \"Pt3911\",\n \"Pt3916\",\n \"Pt3920\",\n \"Pt3928\",\n] as const;\nexport const rtdTypeZ = z.enum(RTD_TYPES);\nexport type RTDType = z.infer<typeof rtdTypeZ>;\n\nexport const STRAIN_CONFIGS = [\n \"FullBridgeI\",\n \"FullBridgeII\",\n \"FullBridgeIII\",\n \"HalfBridgeI\",\n \"HalfBridgeII\",\n \"QuarterBridgeI\",\n \"QuarterBridgeII\",\n] as const;\nexport const strainConfigZ = z.enum(STRAIN_CONFIGS);\nexport type StrainConfig = z.infer<typeof strainConfigZ>;\n\nexport const THERMOCOUPLE_TYPES = [\"J\", \"K\", \"N\", \"R\", \"S\", \"T\", \"B\", \"E\"] as const;\nexport const thermocoupleTypeZ = z.enum(THERMOCOUPLE_TYPES);\nexport type ThermocoupleType = z.infer<typeof thermocoupleTypeZ>;\n\nexport const VELOCITY_UNITS = [\"MetersPerSecond\", \"InchesPerSecond\"] as const;\nexport const velocityUnitsZ = z.enum(VELOCITY_UNITS);\nexport type VelocityUnits = z.infer<typeof velocityUnitsZ>;\n\nexport const VELOCITY_SENSITIVITY_UNITS = [\n \"MillivoltsPerMillimeterPerSecond\",\n \"MilliVoltsPerInchPerSecond\",\n] as const;\nexport const velocitySensitivityUnitsZ = z.enum(VELOCITY_SENSITIVITY_UNITS);\nexport type VelocitySensitivityUnits = z.infer<typeof velocitySensitivityUnitsZ>;\n\nexport const CHARGE_UNITS = [\"Coulombs\", \"PicoCoulombs\"] as const;\nexport const chargeUnitsZ = z.enum(CHARGE_UNITS);\nexport type ChargeUnits = z.infer<typeof chargeUnitsZ>;\n\nexport const CI_EDGES = [\"Rising\", \"Falling\"] as const;\nexport const ciEdgeZ = z.enum(CI_EDGES);\nexport type CIEdge = z.infer<typeof ciEdgeZ>;\n\nexport const CI_MEAS_METHODS = [\n \"LowFreq1Ctr\",\n \"HighFreq2Ctr\",\n \"LargeRng2Ctr\",\n \"DynamicAvg\",\n] as const;\nexport const ciMeasMethodZ = z.enum(CI_MEAS_METHODS);\nexport type CIMeasMethod = z.infer<typeof ciMeasMethodZ>;\n\nexport const CI_FREQ_UNITS = [\"Hz\", \"Ticks\"] as const;\nexport const ciFreqUnitsZ = z.enum(CI_FREQ_UNITS);\nexport type CIFreqUnits = z.infer<typeof ciFreqUnitsZ>;\n\nexport const CI_TIME_UNITS = [\"Seconds\", \"Ticks\"] as const;\nexport const ciTimeUnitsZ = z.enum(CI_TIME_UNITS);\nexport type CITimeUnits = z.infer<typeof ciTimeUnitsZ>;\n\nexport const CI_COUNT_DIRECTIONS = [\n \"CountUp\",\n \"CountDown\",\n \"ExternallyControlled\",\n] as const;\nexport const ciCountDirectionZ = z.enum(CI_COUNT_DIRECTIONS);\nexport type CICountDirection = z.infer<typeof ciCountDirectionZ>;\n\nexport const CI_DECODING_TYPES = [\"X1\", \"X2\", \"X4\", \"TwoPulse\"] as const;\nexport const ciDecodingTypeZ = z.enum(CI_DECODING_TYPES);\nexport type CIDecodingType = z.infer<typeof ciDecodingTypeZ>;\n\nexport const CI_LINEAR_VELOCITY_UNITS = [\"m/s\", \"in/s\"] as const;\nexport const ciLinearVelocityUnitsZ = z.enum(CI_LINEAR_VELOCITY_UNITS);\nexport type CILinearVelocityUnits = z.infer<typeof ciLinearVelocityUnitsZ>;\n\nexport const CI_ANGULAR_VELOCITY_UNITS = [\"RPM\", \"Radians/s\", \"Degrees/s\"] as const;\nexport const ciAngularVelocityUnitsZ = z.enum(CI_ANGULAR_VELOCITY_UNITS);\nexport type CIAngularVelocityUnits = z.infer<typeof ciAngularVelocityUnitsZ>;\n\nexport const CI_LINEAR_POSITION_UNITS = [\"Meters\", \"Inches\", \"Ticks\"] as const;\nexport const ciLinearPositionUnitsZ = z.enum(CI_LINEAR_POSITION_UNITS);\nexport type CILinearPositionUnits = z.infer<typeof ciLinearPositionUnitsZ>;\n\nexport const CI_ANGULAR_POSITION_UNITS = [\"Degrees\", \"Radians\", \"Ticks\"] as const;\nexport const ciAngularPositionUnitsZ = z.enum(CI_ANGULAR_POSITION_UNITS);\nexport type CIAngularPositionUnits = z.infer<typeof ciAngularPositionUnitsZ>;\n\nexport const WAVE_TYPES = [\"Sine\", \"Triangle\", \"Square\", \"Sawtooth\"] as const;\nexport const waveTypeZ = z.enum(WAVE_TYPES);\nexport type WaveType = z.infer<typeof waveTypeZ>;\n\nexport const ACCEL_CHARGE_SENSITIVITY_UNITS = [\n \"PicoCoulombsPerG\",\n \"PicoCoulombsPerMetersPerSecondSquared\",\n \"PicoCoulombsPerInchesPerSecondSquared\",\n] as const;\nexport const accelChargeSensitivityUnitsZ = z.enum(ACCEL_CHARGE_SENSITIVITY_UNITS);\nexport type AccelChargeSensitivityUnits = z.infer<typeof accelChargeSensitivityUnitsZ>;\n\n/** MinMaxVal bounds the expected signal range in scaled units. */\nexport const minMaxValZ = z.object({\n /** minVal is the minimum expected value, in scaled units. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected value, in scaled units. */\n maxVal: z.number().default(1),\n});\nexport interface MinMaxVal extends z.infer<typeof minMaxValZ> {}\n\n/** Terminal configures the terminal wiring of an analog input channel. */\nexport const terminalZ = z.object({\n /** terminalConfig selects the terminal configuration (RSE, NRSE, Diff, ...). */\n terminalConfig: terminalConfigZ.default(\"Cfg_Default\"),\n});\nexport interface Terminal extends z.infer<typeof terminalZ> {}\n\n/** Sensitivity specifies a sensor's sensitivity rating. */\nexport const sensitivityZ = z.object({\n /** sensitivity is the sensor's sensitivity rating. */\n sensitivity: z.number().default(0),\n});\nexport interface Sensitivity extends z.infer<typeof sensitivityZ> {}\n\n/** CurrentExcitation configures the current excitation supplied to a sensor. */\nexport const currentExcitationZ = z.object({\n /** currentExcitSource selects the source of the current excitation signal. */\n currentExcitSource: excitationSourceZ.default(\"Internal\"),\n /** currentExcitVal is the current excitation level, in Amps. */\n currentExcitVal: z.number().default(0),\n});\nexport interface CurrentExcitation extends z.infer<typeof currentExcitationZ> {}\n\n/** VoltageExcitation configures the voltage excitation supplied to a sensor. */\nexport const voltageExcitationZ = z.object({\n /** voltageExcitSource selects the source of the voltage excitation signal. */\n voltageExcitSource: excitationSourceZ.default(\"Internal\"),\n /** voltageExcitVal is the voltage excitation level, in Volts. */\n voltageExcitVal: z.number().default(0),\n});\nexport interface VoltageExcitation extends z.infer<typeof voltageExcitationZ> {}\n\n/** Bridge configures the wiring and nominal resistance of a bridge-based sensor. */\nexport const bridgeZ = z.object({\n /** bridgeConfig selects the physical bridge wiring. */\n bridgeConfig: bridgeConfigZ.default(\"FullBridge\"),\n /** nominalBridgeResistance is the nominal resistance of the bridge, in Ohms. */\n nominalBridgeResistance: z.number().default(1),\n});\nexport interface Bridge extends z.infer<typeof bridgeZ> {}\n\n/**\n * BridgePolynomial scales bridge electrical output to physical units with a polynomial.\n */\nexport const bridgePolynomialZ = z.object({\n /** forwardCoeffs are the coefficients mapping electrical to physical values. */\n forwardCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** reverseCoeffs are the coefficients mapping physical to electrical values. */\n reverseCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** electricalUnits are the electrical output units of the bridge. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n});\nexport interface BridgePolynomial extends z.infer<typeof bridgePolynomialZ> {}\n\n/** Resistance configures the wiring of a resistance measurement. */\nexport const resistanceZ = z.object({\n /**\n * resistanceConfig selects the number of wires used for the resistance measurement.\n */\n resistanceConfig: resistanceConfigZ.default(\"2Wire\"),\n});\nexport interface Resistance extends z.infer<typeof resistanceZ> {}\n\n/** Table scales bridge electrical output to physical units with a lookup table. */\nexport const tableZ = z.object({\n /** electricalVals are the electrical breakpoints of the calibration table. */\n electricalVals: z\n .number()\n .array()\n .default(() => []),\n /** electricalUnits are the units of the electrical breakpoints. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n /**\n * physicalVals are the physical values corresponding to each electrical breakpoint.\n */\n physicalVals: z\n .number()\n .array()\n .default(() => []),\n});\nexport interface Table extends z.infer<typeof tableZ> {}\n\n/**\n * TwoPointLin scales bridge electrical output to physical units between two calibration\n * points.\n */\nexport const twoPointLinZ = z.object({\n /** firstElectricalVal is the first electrical calibration point. */\n firstElectricalVal: z.number().default(0),\n /** secondElectricalVal is the second electrical calibration point. */\n secondElectricalVal: z.number().default(1),\n /** electricalUnits are the units of the electrical calibration points. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n /** firstPhysicalVal is the physical value at the first electrical point. */\n firstPhysicalVal: z.number().default(0),\n /** secondPhysicalVal is the physical value at the second electrical point. */\n secondPhysicalVal: z.number().default(1),\n});\nexport interface TwoPointLin extends z.infer<typeof twoPointLinZ> {}\n\n/** BaseAIChannel carries the fields every NI analog input channel shares. */\nexport const baseAIChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from. */\n port: z.int32().default(0),\n /** device is the key of the device the channel belongs to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseAIChannel extends z.infer<typeof baseAIChannelZ> {}\n\n/** ZIndex configures the Z-index reset behavior of an encoder. */\nexport const zIndexZ = z.object({\n /** zIndexEnabled is true when the encoder's Z index resets the count. */\n zIndexEnabled: z.boolean().default(false),\n /** zIndexVal is the value the measurement resets to when the Z index is active. */\n zIndexVal: z.number().default(0),\n /** zIndexPhase selects the A/B states at which the Z index is active. */\n zIndexPhase: zIndexPhaseZ.default(\"AHighBHigh\"),\n /** terminalZ is the terminal the Z index signal is wired to. */\n terminalZ: z.string().default(\"\"),\n});\nexport interface ZIndex extends z.infer<typeof zIndexZ> {}\n\n/** BaseCIChannel carries the fields every NI counter input channel shares. */\nexport const baseCIChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical counter the channel uses. */\n port: z.int32().default(0),\n /** device is the key of the device the counter belongs to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseCIChannel extends z.infer<typeof baseCIChannelZ> {}\n\n/** BaseAOChannel carries the fields every NI analog output channel shares. */\nexport const baseAOChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to. */\n port: z.int32().default(0),\n});\nexport interface BaseAOChannel extends z.infer<typeof baseAOChannelZ> {}\n\n/** DIChannel is a digital input channel the task acquires from. */\nexport const diChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from. */\n port: z.int32().default(0),\n /** line is the digital line within the port the channel reads from. */\n line: z.int32().default(0),\n});\nexport interface DIChannel extends z.infer<typeof diChannelZ> {}\n\n/** DOChannel is a digital output channel the task drives. */\nexport const doChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to. */\n port: z.int32().default(0),\n /** line is the digital line within the port the channel writes to. */\n line: z.int32().default(0),\n});\nexport interface DOChannel extends z.infer<typeof doChannelZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n stateRate: z.number().default(10),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n\nexport const scanConfigZ = task.scanConfigZ.extend({\n ignoredModels: z.string().array().default([\"^cRIO.*\", \"^nown.*\"]),\n});\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** BuiltInCJC reads the reference temperature from the device's own sensor. */\nexport const builtInCJCZ = z.object({\n source: z.literal(\"built_in\"),\n});\nexport interface BuiltInCJC extends z.infer<typeof builtInCJCZ> {}\n\n/** ConstValCJC uses a fixed reference temperature. */\nexport const constValCJCZ = z.object({\n source: z.literal(\"const_val\"),\n /** val is the reference temperature, in the channel's units. */\n val: z.number().default(0),\n});\nexport interface ConstValCJC extends z.infer<typeof constValCJCZ> {}\n\n/** ChanCJC reads the reference temperature from another channel. */\nexport const chanCJCZ = z.object({\n source: z.literal(\"chan\"),\n /** port is the port of the channel that measures the reference. */\n port: z.int32().default(0),\n});\nexport interface ChanCJC extends z.infer<typeof chanCJCZ> {}\n\nexport const CJC_TYPES = [\"built_in\", \"const_val\", \"chan\"] as const;\nexport const cjcTypeZ = z.enum(CJC_TYPES);\nexport type CJCType = z.infer<typeof cjcTypeZ>;\n\n/**\n * CJC is the cold-junction compensation for a thermocouple. The source selects where\n * the reference temperature comes from.\n */\nexport const cjcZ = z.discriminatedUnion(\"source\", [\n builtInCJCZ,\n constValCJCZ,\n chanCJCZ,\n]);\nexport type CJC = BuiltInCJC | ConstValCJC | ChanCJC;\n\nexport const CJC_SCHEMAS: {\n [K in CJCType]: z.ZodType<Extract<CJC, { source: K }>>;\n} = {\n built_in: builtInCJCZ,\n const_val: constValCJCZ,\n chan: chanCJCZ,\n};\n\n/** LinearScale maps raw values to engineering units with a slope and intercept. */\nexport const linearScaleZ = z.object({\n type: z.literal(\"linear\"),\n /** slope is the multiplier applied to the raw value. */\n slope: z.number().default(1),\n /** yIntercept is the offset added after scaling. */\n yIntercept: z.number().default(0),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface LinearScale extends z.infer<typeof linearScaleZ> {}\n\n/** MapScale maps a raw range linearly onto a scaled range. */\nexport const mapScaleZ = z.object({\n type: z.literal(\"map\"),\n /** preScaledMin is the lower bound of the raw input range. */\n preScaledMin: z.number().default(0),\n /** preScaledMax is the upper bound of the raw input range. */\n preScaledMax: z.number().default(1),\n /** scaledMin is the lower bound of the scaled output range. */\n scaledMin: z.number().default(0),\n /** scaledMax is the upper bound of the scaled output range. */\n scaledMax: z.number().default(1),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface MapScale extends z.infer<typeof mapScaleZ> {}\n\n/** TableScale maps raw values to engineering units via a lookup table. */\nexport const tableScaleZ = z.object({\n type: z.literal(\"table\"),\n /** preScaledVals are the raw breakpoints, monotonically increasing. */\n preScaledVals: z\n .number()\n .array()\n .default(() => []),\n /** scaledVals are the engineering-unit values at each breakpoint. */\n scaledVals: z\n .number()\n .array()\n .default(() => []),\n /** preScaledUnits are the units of the raw values before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the values after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface TableScale extends z.infer<typeof tableScaleZ> {}\n\n/** PolynomialScale maps raw values to engineering units with a polynomial. */\nexport const polynomialScaleZ = z.object({\n type: z.literal(\"polynomial\"),\n /** forwardCoeffs are the coefficients mapping pre-scaled to scaled values. */\n forwardCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** reverseCoeffs are the coefficients mapping scaled to pre-scaled values. */\n reverseCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface PolynomialScale extends z.infer<typeof polynomialScaleZ> {}\n\n/** NoneScale applies no scaling; the raw value is used directly. */\nexport const noneScaleZ = z.object({\n type: z.literal(\"none\"),\n});\nexport interface NoneScale extends z.infer<typeof noneScaleZ> {}\n\nexport const SCALE_TYPES = [\"linear\", \"map\", \"table\", \"polynomial\", \"none\"] as const;\nexport const scaleTypeZ = z.enum(SCALE_TYPES);\nexport type ScaleType = z.infer<typeof scaleTypeZ>;\n\n/** Scale determines how raw sensor values are transformed to engineering units. */\nexport const scaleZ = z.discriminatedUnion(\"type\", [\n linearScaleZ,\n mapScaleZ,\n tableScaleZ,\n polynomialScaleZ,\n noneScaleZ,\n]);\nexport type Scale = LinearScale | MapScale | TableScale | PolynomialScale | NoneScale;\n\nexport const SCALE_SCHEMAS: {\n [K in ScaleType]: z.ZodType<Extract<Scale, { type: K }>>;\n} = {\n linear: linearScaleZ,\n map: mapScaleZ,\n table: tableScaleZ,\n polynomial: polynomialScaleZ,\n none: noneScaleZ,\n};\n\nexport const digitalReadConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: diChannelZ.array().default(() => []),\n});\nexport interface DigitalReadConfig extends z.infer<typeof digitalReadConfigZ> {}\n\nexport const digitalWriteConfigZ = writeConfigZ.extend({\n channels: doChannelZ.array().default(() => []),\n});\nexport interface DigitalWriteConfig extends z.infer<typeof digitalWriteConfigZ> {}\n\n/** CustomScale applies a user-defined scale to the raw measurement. */\nexport const customScaleZ = z.object({\n /** customScale is the scale applied to the raw measurement. */\n customScale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface CustomScale extends z.infer<typeof customScaleZ> {}\n\n/** AIVoltageChannel reads a voltage. */\nexport const aiVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage\"),\n });\nexport interface AIVoltageChannel extends z.infer<typeof aiVoltageChannelZ> {}\n\n/** AIAccelChannel reads acceleration from an accelerometer. */\nexport const aiAccelChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelSensitivityUnitsZ.default(\"mVoltsPerG\"),\n });\nexport interface AIAccelChannel extends z.infer<typeof aiAccelChannelZ> {}\n\n/** AIBridgeChannel reads a generic bridge-based sensor. */\nexport const aiBridgeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_bridge\"),\n /** units are the electrical output units of the bridge. */\n units: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n });\nexport interface AIBridgeChannel extends z.infer<typeof aiBridgeChannelZ> {}\n\n/** AICurrentChannel reads a current. */\nexport const aiCurrentChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_current\"),\n /** shuntResistorLoc selects where the shunt resistor is located. */\n shuntResistorLoc: shuntResistorLocationZ.default(\"Default\"),\n /** extShuntResistorVal is the external shunt resistor value, in Ohms. */\n extShuntResistorVal: z.number().default(1),\n });\nexport interface AICurrentChannel extends z.infer<typeof aiCurrentChannelZ> {}\n\n/** AIForceBridgeTableChannel reads force from a bridge with a calibration table. */\nexport const aiForceBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_table\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgeTableChannel extends z.infer<\n typeof aiForceBridgeTableChannelZ\n> {}\n\n/**\n * AIForceBridgeTwoPointLinChannel reads force from a bridge with two-point linear\n * calibration.\n */\nexport const aiForceBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_two_point_lin\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgeTwoPointLinChannel extends z.infer<\n typeof aiForceBridgeTwoPointLinChannelZ\n> {}\n\n/** AIForceIEPEChannel reads force from an IEPE sensor. */\nexport const aiForceIEPEChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_iepe\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** sensitivityUnits are the units of the IEPE sensor sensitivity. */\n sensitivityUnits: forceSensitivityUnitsZ.default(\"mVoltsPerNewton\"),\n });\nexport interface AIForceIEPEChannel extends z.infer<typeof aiForceIEPEChannelZ> {}\n\n/** AIMicrophoneChannel reads sound pressure from a microphone. */\nexport const aiMicrophoneChannelZ = baseAIChannelZ\n .extend(terminalZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_microphone\"),\n /** micSensitivity is the microphone sensitivity, in mV/Pa. */\n micSensitivity: z.number().default(0),\n /** maxSndPressLevel is the maximum expected sound pressure level, in dB. */\n maxSndPressLevel: z.number().default(0),\n });\nexport interface AIMicrophoneChannel extends z.infer<typeof aiMicrophoneChannelZ> {}\n\n/**\n * AIPressureBridgeTableChannel reads pressure from a bridge with a calibration table.\n */\nexport const aiPressureBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_table\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgeTableChannel extends z.infer<\n typeof aiPressureBridgeTableChannelZ\n> {}\n\n/**\n * AIPressureBridgeTwoPointLinChannel reads pressure from a bridge with two-point linear\n * calibration.\n */\nexport const aiPressureBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_two_point_lin\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgeTwoPointLinChannel extends z.infer<\n typeof aiPressureBridgeTwoPointLinChannelZ\n> {}\n\n/** AIResistanceChannel reads a resistance. */\nexport const aiResistanceChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_resistance\"),\n });\nexport interface AIResistanceChannel extends z.infer<typeof aiResistanceChannelZ> {}\n\n/** AIRTDChannel reads temperature from an RTD. */\nexport const aiRTDChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_rtd\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** rtdType selects the RTD resistance-temperature curve. */\n rtdType: rtdTypeZ.default(\"Pt3750\"),\n /** r0 is the sensor resistance at 0 degrees Celsius, in Ohms. */\n r0: z.number().default(0),\n });\nexport interface AIRTDChannel extends z.infer<typeof aiRTDChannelZ> {}\n\n/** AIStrainGaugeChannel reads strain from a strain gauge. */\nexport const aiStrainGaugeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_strain_gauge\"),\n /** strainConfig selects the strain-gauge bridge configuration. */\n strainConfig: strainConfigZ.default(\"FullBridgeI\"),\n /** gageFactor is the gauge factor of the strain gauge. */\n gageFactor: z.number().default(0),\n /** initialBridgeVoltage is the bridge output voltage in the unloaded state. */\n initialBridgeVoltage: z.number().default(0),\n /** nominalGageResistance is the nominal gauge resistance, in Ohms. */\n nominalGageResistance: z.number().default(0),\n /** poissonRatio is the Poisson ratio of the measured material. */\n poissonRatio: z.number().default(0),\n /** leadWireResistance is the resistance of the lead wires, in Ohms. */\n leadWireResistance: z.number().default(0),\n });\nexport interface AIStrainGaugeChannel extends z.infer<typeof aiStrainGaugeChannelZ> {}\n\n/** AITempBuiltinChannel reads temperature from the device's built-in sensor. */\nexport const aiTempBuiltinChannelZ = baseAIChannelZ.omit({ port: true }).extend({\n type: z.literal(\"ai_temp_builtin\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n});\nexport interface AITempBuiltinChannel extends z.infer<typeof aiTempBuiltinChannelZ> {}\n\n/** AIThermocoupleChannel reads temperature from a thermocouple. */\nexport const aiThermocoupleChannelZ = baseAIChannelZ.extend(minMaxValZ.shape).extend({\n type: z.literal(\"ai_thermocouple\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** thermocoupleType selects the thermocouple alloy type. */\n thermocoupleType: thermocoupleTypeZ.default(\"J\"),\n /** cjc is the cold-junction compensation applied to the reading. */\n cjc: cjcZ.prefault({ source: \"built_in\" }),\n});\nexport interface AIThermocoupleChannel extends z.infer<typeof aiThermocoupleChannelZ> {}\n\n/** AITorqueBridgeTableChannel reads torque from a bridge with a calibration table. */\nexport const aiTorqueBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_table\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgeTableChannel extends z.infer<\n typeof aiTorqueBridgeTableChannelZ\n> {}\n\n/**\n * AITorqueBridgeTwoPointLinChannel reads torque from a bridge with two-point linear\n * calibration.\n */\nexport const aiTorqueBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_two_point_lin\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgeTwoPointLinChannel extends z.infer<\n typeof aiTorqueBridgeTwoPointLinChannelZ\n> {}\n\n/** AIVelocityIEPEChannel reads velocity from an IEPE sensor. */\nexport const aiVelocityIEPEChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_velocity_iepe\"),\n /** units are the units of the velocity measurement. */\n units: velocityUnitsZ.default(\"MetersPerSecond\"),\n /** sensitivityUnits are the units of the IEPE sensor sensitivity. */\n sensitivityUnits: velocitySensitivityUnitsZ.default(\n \"MillivoltsPerMillimeterPerSecond\",\n ),\n });\nexport interface AIVelocityIEPEChannel extends z.infer<typeof aiVelocityIEPEChannelZ> {}\n\n/**\n * AIAccel4WireDCVoltageChannel reads acceleration from a 4-wire DC-voltage\n * accelerometer.\n */\nexport const aiAccel4WireDCVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel_4_wire_dc_voltage\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelSensitivityUnitsZ.default(\"mVoltsPerG\"),\n /**\n * scaledByExcitation is true when the excitation voltage is used to scale the\n * reading.\n */\n scaledByExcitation: z.boolean().default(false),\n });\nexport interface AIAccel4WireDCVoltageChannel extends z.infer<\n typeof aiAccel4WireDCVoltageChannelZ\n> {}\n\n/** AIAccelChargeChannel reads acceleration from a charge-mode accelerometer. */\nexport const aiAccelChargeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel_charge\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelChargeSensitivityUnitsZ.default(\"PicoCoulombsPerG\"),\n });\nexport interface AIAccelChargeChannel extends z.infer<typeof aiAccelChargeChannelZ> {}\n\n/** AIChargeChannel reads a raw charge. */\nexport const aiChargeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_charge\"),\n /** units are the units of the charge measurement. */\n units: chargeUnitsZ.default(\"Coulombs\"),\n });\nexport interface AIChargeChannel extends z.infer<typeof aiChargeChannelZ> {}\n\n/** AICurrentRMSChannel reads RMS current. */\nexport const aiCurrentRMSChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_current_rms\"),\n /** shuntResistorLoc selects where the shunt resistor is located. */\n shuntResistorLoc: shuntResistorLocationZ.default(\"Default\"),\n /** extShuntResistorVal is the external shunt resistor value, in Ohms. */\n extShuntResistorVal: z.number().default(1),\n });\nexport interface AICurrentRMSChannel extends z.infer<typeof aiCurrentRMSChannelZ> {}\n\n/**\n * AIForceBridgePolynomialChannel reads force from a bridge with polynomial calibration.\n */\nexport const aiForceBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_polynomial\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgePolynomialChannel extends z.infer<\n typeof aiForceBridgePolynomialChannelZ\n> {}\n\n/** AIFreqVoltageChannel reads frequency from a voltage signal. */\nexport const aiFreqVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_freq_voltage\"),\n /** thresholdLevel is the voltage level at which a cycle is counted. */\n thresholdLevel: z.number().default(0),\n /** hysteresis is the hysteresis applied around the threshold level. */\n hysteresis: z.number().default(0),\n });\nexport interface AIFreqVoltageChannel extends z.infer<typeof aiFreqVoltageChannelZ> {}\n\n/**\n * AIPressureBridgePolynomialChannel reads pressure from a bridge with polynomial\n * calibration.\n */\nexport const aiPressureBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_polynomial\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgePolynomialChannel extends z.infer<\n typeof aiPressureBridgePolynomialChannelZ\n> {}\n\n/** AIThermistorIexChannel reads temperature from a current-excited thermistor. */\nexport const aiThermistorIexChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_thermistor_iex\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** a is the first Steinhart-Hart coefficient. */\n a: z.number().default(0),\n /** b is the second Steinhart-Hart coefficient. */\n b: z.number().default(0),\n /** c is the third Steinhart-Hart coefficient. */\n c: z.number().default(0),\n });\nexport interface AIThermistorIexChannel extends z.infer<\n typeof aiThermistorIexChannelZ\n> {}\n\n/** AIThermistorVexChannel reads temperature from a voltage-excited thermistor. */\nexport const aiThermistorVexChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_thermistor_vex\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** a is the first Steinhart-Hart coefficient. */\n a: z.number().default(0),\n /** b is the second Steinhart-Hart coefficient. */\n b: z.number().default(0),\n /** c is the third Steinhart-Hart coefficient. */\n c: z.number().default(0),\n /** r1 is the reference resistor value, in Ohms. */\n r1: z.number().default(0),\n });\nexport interface AIThermistorVexChannel extends z.infer<\n typeof aiThermistorVexChannelZ\n> {}\n\n/**\n * AITorqueBridgePolynomialChannel reads torque from a bridge with polynomial\n * calibration.\n */\nexport const aiTorqueBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_polynomial\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgePolynomialChannel extends z.infer<\n typeof aiTorqueBridgePolynomialChannelZ\n> {}\n\n/** AIVoltageRMSChannel reads RMS voltage. */\nexport const aiVoltageRMSChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage_rms\"),\n });\nexport interface AIVoltageRMSChannel extends z.infer<typeof aiVoltageRMSChannelZ> {}\n\n/** AIVoltageWithExcitChannel reads a voltage with excitation. */\nexport const aiVoltageWithExcitChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage_with_excit\"),\n /** bridgeConfig selects the physical bridge wiring. */\n bridgeConfig: bridgeConfigZ.default(\"FullBridge\"),\n /**\n * scaledByExcitation is true when the excitation voltage is used to scale the\n * reading.\n */\n scaledByExcitation: z.boolean().default(false),\n });\nexport interface AIVoltageWithExcitChannel extends z.infer<\n typeof aiVoltageWithExcitChannelZ\n> {}\n\nexport const AI_CHANNEL_TYPES = [\n \"ai_voltage\",\n \"ai_accel\",\n \"ai_bridge\",\n \"ai_current\",\n \"ai_force_bridge_table\",\n \"ai_force_bridge_two_point_lin\",\n \"ai_force_iepe\",\n \"ai_microphone\",\n \"ai_pressure_bridge_table\",\n \"ai_pressure_bridge_two_point_lin\",\n \"ai_resistance\",\n \"ai_rtd\",\n \"ai_strain_gauge\",\n \"ai_temp_builtin\",\n \"ai_thermocouple\",\n \"ai_torque_bridge_table\",\n \"ai_torque_bridge_two_point_lin\",\n \"ai_velocity_iepe\",\n \"ai_accel_4_wire_dc_voltage\",\n \"ai_accel_charge\",\n \"ai_charge\",\n \"ai_current_rms\",\n \"ai_force_bridge_polynomial\",\n \"ai_freq_voltage\",\n \"ai_pressure_bridge_polynomial\",\n \"ai_thermistor_iex\",\n \"ai_thermistor_vex\",\n \"ai_torque_bridge_polynomial\",\n \"ai_voltage_rms\",\n \"ai_voltage_with_excit\",\n] as const;\nexport const aiChannelTypeZ = z.enum(AI_CHANNEL_TYPES);\nexport type AIChannelType = z.infer<typeof aiChannelTypeZ>;\n\n/**\n * AIChannel is a single NI analog input channel. The type field selects the measurement\n * mode and the fields that accompany it.\n */\nexport const aiChannelZ = z.discriminatedUnion(\"type\", [\n aiVoltageChannelZ,\n aiAccelChannelZ,\n aiBridgeChannelZ,\n aiCurrentChannelZ,\n aiForceBridgeTableChannelZ,\n aiForceBridgeTwoPointLinChannelZ,\n aiForceIEPEChannelZ,\n aiMicrophoneChannelZ,\n aiPressureBridgeTableChannelZ,\n aiPressureBridgeTwoPointLinChannelZ,\n aiResistanceChannelZ,\n aiRTDChannelZ,\n aiStrainGaugeChannelZ,\n aiTempBuiltinChannelZ,\n aiThermocoupleChannelZ,\n aiTorqueBridgeTableChannelZ,\n aiTorqueBridgeTwoPointLinChannelZ,\n aiVelocityIEPEChannelZ,\n aiAccel4WireDCVoltageChannelZ,\n aiAccelChargeChannelZ,\n aiChargeChannelZ,\n aiCurrentRMSChannelZ,\n aiForceBridgePolynomialChannelZ,\n aiFreqVoltageChannelZ,\n aiPressureBridgePolynomialChannelZ,\n aiThermistorIexChannelZ,\n aiThermistorVexChannelZ,\n aiTorqueBridgePolynomialChannelZ,\n aiVoltageRMSChannelZ,\n aiVoltageWithExcitChannelZ,\n]);\nexport type AIChannel =\n | AIVoltageChannel\n | AIAccelChannel\n | AIBridgeChannel\n | AICurrentChannel\n | AIForceBridgeTableChannel\n | AIForceBridgeTwoPointLinChannel\n | AIForceIEPEChannel\n | AIMicrophoneChannel\n | AIPressureBridgeTableChannel\n | AIPressureBridgeTwoPointLinChannel\n | AIResistanceChannel\n | AIRTDChannel\n | AIStrainGaugeChannel\n | AITempBuiltinChannel\n | AIThermocoupleChannel\n | AITorqueBridgeTableChannel\n | AITorqueBridgeTwoPointLinChannel\n | AIVelocityIEPEChannel\n | AIAccel4WireDCVoltageChannel\n | AIAccelChargeChannel\n | AIChargeChannel\n | AICurrentRMSChannel\n | AIForceBridgePolynomialChannel\n | AIFreqVoltageChannel\n | AIPressureBridgePolynomialChannel\n | AIThermistorIexChannel\n | AIThermistorVexChannel\n | AITorqueBridgePolynomialChannel\n | AIVoltageRMSChannel\n | AIVoltageWithExcitChannel;\n\nexport const AI_CHANNEL_SCHEMAS: {\n [K in AIChannelType]: z.ZodType<Extract<AIChannel, { type: K }>>;\n} = {\n ai_voltage: aiVoltageChannelZ,\n ai_accel: aiAccelChannelZ,\n ai_bridge: aiBridgeChannelZ,\n ai_current: aiCurrentChannelZ,\n ai_force_bridge_table: aiForceBridgeTableChannelZ,\n ai_force_bridge_two_point_lin: aiForceBridgeTwoPointLinChannelZ,\n ai_force_iepe: aiForceIEPEChannelZ,\n ai_microphone: aiMicrophoneChannelZ,\n ai_pressure_bridge_table: aiPressureBridgeTableChannelZ,\n ai_pressure_bridge_two_point_lin: aiPressureBridgeTwoPointLinChannelZ,\n ai_resistance: aiResistanceChannelZ,\n ai_rtd: aiRTDChannelZ,\n ai_strain_gauge: aiStrainGaugeChannelZ,\n ai_temp_builtin: aiTempBuiltinChannelZ,\n ai_thermocouple: aiThermocoupleChannelZ,\n ai_torque_bridge_table: aiTorqueBridgeTableChannelZ,\n ai_torque_bridge_two_point_lin: aiTorqueBridgeTwoPointLinChannelZ,\n ai_velocity_iepe: aiVelocityIEPEChannelZ,\n ai_accel_4_wire_dc_voltage: aiAccel4WireDCVoltageChannelZ,\n ai_accel_charge: aiAccelChargeChannelZ,\n ai_charge: aiChargeChannelZ,\n ai_current_rms: aiCurrentRMSChannelZ,\n ai_force_bridge_polynomial: aiForceBridgePolynomialChannelZ,\n ai_freq_voltage: aiFreqVoltageChannelZ,\n ai_pressure_bridge_polynomial: aiPressureBridgePolynomialChannelZ,\n ai_thermistor_iex: aiThermistorIexChannelZ,\n ai_thermistor_vex: aiThermistorVexChannelZ,\n ai_torque_bridge_polynomial: aiTorqueBridgePolynomialChannelZ,\n ai_voltage_rms: aiVoltageRMSChannelZ,\n ai_voltage_with_excit: aiVoltageWithExcitChannelZ,\n};\n\n/** CIFrequencyChannel measures signal frequency. */\nexport const ciFrequencyChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_frequency\"),\n /** minVal is the minimum expected frequency. */\n minVal: z.number().default(2),\n /** maxVal is the maximum expected frequency. */\n maxVal: z.number().default(100),\n /** units are the units of the frequency measurement. */\n units: ciFreqUnitsZ.default(\"Hz\"),\n /** edge selects the edge the counter responds to. */\n edge: ciEdgeZ.default(\"Rising\"),\n /** measMethod selects the measurement method. */\n measMethod: ciMeasMethodZ.default(\"DynamicAvg\"),\n /** measTime is the averaging window for high-frequency measurement, in seconds. */\n measTime: z.number().default(0.000006),\n /** divisor is the counter divisor for large-range measurement. */\n divisor: z.int32().default(4),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIFrequencyChannel extends z.infer<typeof ciFrequencyChannelZ> {}\n\n/** CIEdgeCountChannel counts signal edges. */\nexport const ciEdgeCountChannelZ = baseCIChannelZ.extend({\n type: z.literal(\"ci_edge_count\"),\n /** activeEdge selects the edge that increments the count. */\n activeEdge: ciEdgeZ.default(\"Rising\"),\n /** countDirection selects the direction the counter counts. */\n countDirection: ciCountDirectionZ.default(\"CountUp\"),\n /** initialCount is the value the counter starts at. */\n initialCount: z.number().default(0),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n});\nexport interface CIEdgeCountChannel extends z.infer<typeof ciEdgeCountChannelZ> {}\n\n/** CIPeriodChannel measures signal period. */\nexport const ciPeriodChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_period\"),\n /** minVal is the minimum expected period, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected period, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the period measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** startingEdge selects the edge that starts a period measurement. */\n startingEdge: ciEdgeZ.default(\"Rising\"),\n /** measMethod selects the measurement method. */\n measMethod: ciMeasMethodZ.default(\"DynamicAvg\"),\n /** measTime is the averaging window for high-frequency measurement, in seconds. */\n measTime: z.number().default(0.001),\n /** divisor is the counter divisor for large-range measurement. */\n divisor: z.int32().default(4),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIPeriodChannel extends z.infer<typeof ciPeriodChannelZ> {}\n\n/** CIPulseWidthChannel measures pulse width. */\nexport const ciPulseWidthChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_pulse_width\"),\n /** minVal is the minimum expected pulse width, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected pulse width, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the pulse-width measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** startingEdge selects the edge that starts a pulse-width measurement. */\n startingEdge: ciEdgeZ.default(\"Rising\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIPulseWidthChannel extends z.infer<typeof ciPulseWidthChannelZ> {}\n\n/** CISemiPeriodChannel measures semi-period. */\nexport const ciSemiPeriodChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_semi_period\"),\n /** minVal is the minimum expected semi-period, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected semi-period, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the semi-period measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CISemiPeriodChannel extends z.infer<typeof ciSemiPeriodChannelZ> {}\n\n/** CITwoEdgeSepChannel measures the separation between two edges. */\nexport const ciTwoEdgeSepChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_two_edge_sep\"),\n /** minVal is the minimum expected separation, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected separation, in the selected units. */\n maxVal: z.number().default(1),\n /** units are the units of the two-edge-separation measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** firstEdge selects the edge that starts the measurement. */\n firstEdge: ciEdgeZ.default(\"Rising\"),\n /** secondEdge selects the edge that stops the measurement. */\n secondEdge: ciEdgeZ.default(\"Falling\"),\n /** firstTerminal is the terminal the first edge's signal is wired to. */\n firstTerminal: z.string().default(\"\"),\n /** secondTerminal is the terminal the second edge's signal is wired to. */\n secondTerminal: z.string().default(\"\"),\n });\nexport interface CITwoEdgeSepChannel extends z.infer<typeof ciTwoEdgeSepChannelZ> {}\n\n/** CIVelocityLinearChannel measures linear velocity from an encoder. */\nexport const ciVelocityLinearChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_velocity_linear\"),\n /** minVal is the minimum expected velocity. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected velocity. */\n maxVal: z.number().default(1),\n /** units are the units of the velocity measurement. */\n units: ciLinearVelocityUnitsZ.default(\"m/s\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** distPerPulse is the linear distance per encoder pulse. */\n distPerPulse: z.number().default(0.001),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIVelocityLinearChannel extends z.infer<\n typeof ciVelocityLinearChannelZ\n> {}\n\n/** CIVelocityAngularChannel measures angular velocity from an encoder. */\nexport const ciVelocityAngularChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_velocity_angular\"),\n /** minVal is the minimum expected velocity. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected velocity. */\n maxVal: z.number().default(1),\n /** units are the units of the velocity measurement. */\n units: ciAngularVelocityUnitsZ.default(\"RPM\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** pulsesPerRev is the number of encoder pulses per revolution. */\n pulsesPerRev: z.number().default(24),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIVelocityAngularChannel extends z.infer<\n typeof ciVelocityAngularChannelZ\n> {}\n\n/** CIPositionLinearChannel measures linear position from an encoder. */\nexport const ciPositionLinearChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(zIndexZ.shape)\n .extend({\n type: z.literal(\"ci_position_linear\"),\n /** units are the units of the position measurement. */\n units: ciLinearPositionUnitsZ.default(\"Meters\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** distPerPulse is the linear distance per encoder pulse. */\n distPerPulse: z.number().default(0.000001),\n /** initialPos is the position the encoder starts at. */\n initialPos: z.number().default(0),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIPositionLinearChannel extends z.infer<\n typeof ciPositionLinearChannelZ\n> {}\n\n/** CIPositionAngularChannel measures angular position from an encoder. */\nexport const ciPositionAngularChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(zIndexZ.shape)\n .extend({\n type: z.literal(\"ci_position_angular\"),\n /** units are the units of the position measurement. */\n units: ciAngularPositionUnitsZ.default(\"Degrees\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** pulsesPerRev is the number of encoder pulses per revolution. */\n pulsesPerRev: z.number().default(24),\n /** initialAngle is the angle the encoder starts at. */\n initialAngle: z.number().default(0),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIPositionAngularChannel extends z.infer<\n typeof ciPositionAngularChannelZ\n> {}\n\n/** CIDutyCycleChannel measures the duty cycle of a signal. */\nexport const ciDutyCycleChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_duty_cycle\"),\n /** minVal is the minimum expected duty-cycle frequency. */\n minVal: z.number().default(2),\n /** maxVal is the maximum expected duty-cycle frequency. */\n maxVal: z.number().default(10000),\n /** activeEdge selects the edge the counter responds to. */\n activeEdge: ciEdgeZ.default(\"Rising\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIDutyCycleChannel extends z.infer<typeof ciDutyCycleChannelZ> {}\n\nexport const CI_CHANNEL_TYPES = [\n \"ci_frequency\",\n \"ci_edge_count\",\n \"ci_period\",\n \"ci_pulse_width\",\n \"ci_semi_period\",\n \"ci_two_edge_sep\",\n \"ci_velocity_linear\",\n \"ci_velocity_angular\",\n \"ci_position_linear\",\n \"ci_position_angular\",\n \"ci_duty_cycle\",\n] as const;\nexport const ciChannelTypeZ = z.enum(CI_CHANNEL_TYPES);\nexport type CIChannelType = z.infer<typeof ciChannelTypeZ>;\n\n/**\n * CIChannel is a single NI counter input channel. The type field selects the\n * measurement mode and the fields that accompany it.\n */\nexport const ciChannelZ = z.discriminatedUnion(\"type\", [\n ciFrequencyChannelZ,\n ciEdgeCountChannelZ,\n ciPeriodChannelZ,\n ciPulseWidthChannelZ,\n ciSemiPeriodChannelZ,\n ciTwoEdgeSepChannelZ,\n ciVelocityLinearChannelZ,\n ciVelocityAngularChannelZ,\n ciPositionLinearChannelZ,\n ciPositionAngularChannelZ,\n ciDutyCycleChannelZ,\n]);\nexport type CIChannel =\n | CIFrequencyChannel\n | CIEdgeCountChannel\n | CIPeriodChannel\n | CIPulseWidthChannel\n | CISemiPeriodChannel\n | CITwoEdgeSepChannel\n | CIVelocityLinearChannel\n | CIVelocityAngularChannel\n | CIPositionLinearChannel\n | CIPositionAngularChannel\n | CIDutyCycleChannel;\n\nexport const CI_CHANNEL_SCHEMAS: {\n [K in CIChannelType]: z.ZodType<Extract<CIChannel, { type: K }>>;\n} = {\n ci_frequency: ciFrequencyChannelZ,\n ci_edge_count: ciEdgeCountChannelZ,\n ci_period: ciPeriodChannelZ,\n ci_pulse_width: ciPulseWidthChannelZ,\n ci_semi_period: ciSemiPeriodChannelZ,\n ci_two_edge_sep: ciTwoEdgeSepChannelZ,\n ci_velocity_linear: ciVelocityLinearChannelZ,\n ci_velocity_angular: ciVelocityAngularChannelZ,\n ci_position_linear: ciPositionLinearChannelZ,\n ci_position_angular: ciPositionAngularChannelZ,\n ci_duty_cycle: ciDutyCycleChannelZ,\n};\n\n/** AOCurrentChannel drives a current output. */\nexport const aoCurrentChannelZ = baseAOChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ao_current\"),\n });\nexport interface AOCurrentChannel extends z.infer<typeof aoCurrentChannelZ> {}\n\n/** AOFuncGenChannel drives a function-generator output. */\nexport const aoFuncGenChannelZ = baseAOChannelZ.extend({\n type: z.literal(\"ao_func_gen\"),\n /** waveType selects the waveform to generate. */\n waveType: waveTypeZ.default(\"Sine\"),\n /** frequency is the waveform frequency, in Hertz. */\n frequency: z.number().default(0),\n /** amplitude is the waveform amplitude. */\n amplitude: z.number().default(0),\n /** offset is the waveform DC offset. */\n offset: z.number().default(0),\n});\nexport interface AOFuncGenChannel extends z.infer<typeof aoFuncGenChannelZ> {}\n\n/** AOVoltageChannel drives a voltage output. */\nexport const aoVoltageChannelZ = baseAOChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ao_voltage\"),\n });\nexport interface AOVoltageChannel extends z.infer<typeof aoVoltageChannelZ> {}\n\nexport const AO_CHANNEL_TYPES = [\"ao_current\", \"ao_func_gen\", \"ao_voltage\"] as const;\nexport const aoChannelTypeZ = z.enum(AO_CHANNEL_TYPES);\nexport type AOChannelType = z.infer<typeof aoChannelTypeZ>;\n\n/**\n * AOChannel is a single NI analog output channel. The type field selects the output\n * mode and the fields that accompany it.\n */\nexport const aoChannelZ = z.discriminatedUnion(\"type\", [\n aoCurrentChannelZ,\n aoFuncGenChannelZ,\n aoVoltageChannelZ,\n]);\nexport type AOChannel = AOCurrentChannel | AOFuncGenChannel | AOVoltageChannel;\n\nexport const AO_CHANNEL_SCHEMAS: {\n [K in AOChannelType]: z.ZodType<Extract<AOChannel, { type: K }>>;\n} = {\n ao_current: aoCurrentChannelZ,\n ao_func_gen: aoFuncGenChannelZ,\n ao_voltage: aoVoltageChannelZ,\n};\n\nexport const analogReadConfigZ = task.readConfigZ.extend({\n channels: aiChannelZ.array().default(() => []),\n});\nexport interface AnalogReadConfig extends z.infer<typeof analogReadConfigZ> {}\n\nexport const counterReadConfigZ = task.readConfigZ.extend({\n channels: ciChannelZ.array().default(() => []),\n});\nexport interface CounterReadConfig extends z.infer<typeof counterReadConfigZ> {}\n\nexport const analogWriteConfigZ = writeConfigZ.extend({\n channels: aoChannelZ.array().default(() => []),\n});\nexport interface AnalogWriteConfig extends z.infer<typeof analogWriteConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/ni/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** BaseChannel carries the fields every OPC UA channel shares. */\nexport const baseChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** nodeId is the OPC UA node ID the channel is bound to. */\n nodeId: z.string().default(\"\"),\n /** nodeName is the browse name of the OPC UA node. */\n nodeName: z.string().default(\"\"),\n /** dataType is the data type of the Synnax channel. */\n dataType: z.string().default(\"float32\"),\n});\nexport interface BaseChannel extends z.infer<typeof baseChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\nexport const readChannelZ = baseChannelZ.extend({\n channel: channel.keyZ.default(0),\n isIndex: z.boolean().default(false),\n});\nexport interface ReadChannel extends z.infer<typeof readChannelZ> {}\n\nexport const writeChannelZ = baseChannelZ.extend({\n cmdChannel: channel.keyZ.default(0),\n});\nexport interface WriteChannel extends z.infer<typeof writeChannelZ> {}\n\nexport const readConfigZ = task.readConfigZ\n .omit({ sampleRate: true, streamRate: true })\n .extend({\n sampleRate: z.number().default(50),\n streamRate: z.number().default(25),\n device: device.keyZ.default(\"\"),\n arrayMode: z.boolean().default(false),\n arraySize: z.int32().default(1),\n channels: readChannelZ.array().default(() => []),\n });\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/opcua/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { status } from \"@/status\";\nimport { task } from \"@/task\";\n\n/** Alert maps a Synnax status to a PagerDuty event routing rule. */\nexport const alertZ = z.object({\n /** key uniquely identifies the alert within the task. */\n key: z.string().default(id.create),\n /** status is the key of the Synnax status the alert watches. */\n status: status.keyZ.default(\"\"),\n /** errorsCritical is true when the error variant maps to PagerDuty critical. */\n errorsCritical: z.boolean().default(false),\n /** component is the PagerDuty component attached to triggered events. */\n component: z.string().default(\"\"),\n /** group is the PagerDuty group attached to triggered events. */\n group: z.string().default(\"\"),\n /** class is the PagerDuty class attached to triggered events. */\n class: z.string().default(\"\"),\n /** disabled is true when the alert is excluded from the task. */\n disabled: z.boolean().default(false),\n});\nexport interface Alert extends z.infer<typeof alertZ> {}\n\nexport const taskConfigZ = task.startConfigZ.extend({\n routingKey: z.string().default(\"\"),\n alerts: alertZ.array().default(() => []),\n});\nexport interface TaskConfig extends z.infer<typeof taskConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/pagerduty/types.gen\";\n"],"mappings":";;;;AAmBA,IAAa,IAAc,EAAE,OAAO;CAElC,OAAO,EAAI,OAAO,QAAQ,CAAC;CAE3B,UAAU,EAAI,MAAM,QAAQ,CAAC;CAE7B,WAAW,EAAI,MAAM,QAAQ,EAAE;CAE/B,UAAU,EAAE,OAAO,CAAC,CAAC,QAAQ,QAAQ;AACvC,CAAC,GAIY,KAAmB,EAAE,OAAO;CAEvC,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAG,MAAM;CAEjC,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAE3B,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAK;CAEnC,SAAA,EAAsB,QAAQ,CAAC;CAE/B,QAAA,EAAoB,QAAQ,EAAE;AAChC,CAAC,GAIY,KAAoB,EAAE,OAAO;CAExC,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAG,MAAM;CAEjC,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAE3B,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAK;CAEnC,YAAA,EAAyB,QAAQ,CAAC;CAElC,cAAA,EAA2B,QAAQ,CAAC;CAEpC,gBAAgB,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAErC,kBAAkB,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAEvC,QAAA,EAAoB,QAAQ,EAAE;AAChC,CAAC,GAGY,KAAc,GAId,KAAwB,GAAiB,OAAO;CAC3D,MAAM,EAAE,QAAQ,WAAW;CAE3B,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;AAC5B,CAAC,GAIY,IAAqB,GAAiB,OAAO,EAAY,KAAK,CAAC,CAAC,OAAO,EAClF,MAAM,EAAE,QAAQ,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AC,QAAQ,EAAK;CACpC,WAAW,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC;CAC9B,UAAU,GAAa,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;AACjD,CAAC,GAGU,KAAA,EAAiC,OAAO,EACnD,UAAU,GAAc,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC,EAClD,CAAC;;;;;;;IE7CY,KAAS,EAAE,OAAO;CAE7B,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAG,MAAM;CAEjC,QAAA,GAAoB,QAAQ,EAAE;CAE9B,gBAAgB,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAK;CAEzC,WAAW,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAEhC,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAE5B,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAE5B,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAK;AACrC,CAAC,GAGY,KAAA,GAAgC,OAAO;CAClD,YAAY,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CACjC,QAAQ,GAAO,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;AACzC,CAAC"}
1
+ {"version":3,"file":"client.js","names":[],"sources":["../src/ethercat/types.gen.ts","../src/ethercat/external.ts","../src/http/types.gen.ts","../src/http/external.ts","../src/labjack/types.gen.ts","../src/labjack/external.ts","../src/modbus/types.gen.ts","../src/modbus/external.ts","../src/ni/types.gen.ts","../src/ni/external.ts","../src/opcua/types.gen.ts","../src/opcua/external.ts","../src/pagerduty/types.gen.ts","../src/pagerduty/external.ts"],"sourcesContent":["// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id, zod } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** PDOAddress addresses a PDO entry explicitly in the CoE object dictionary. */\nexport const pdoAddressZ = z.object({\n /** index is the CoE object dictionary index of the PDO entry. */\n index: zod.uint16.default(0),\n /** subIndex is the CoE object dictionary sub-index of the PDO entry. */\n subIndex: zod.uint8.default(0),\n /** bitLength is the size of the PDO entry, in bits. */\n bitLength: zod.uint8.default(16),\n /** dataType is the data type of the PDO entry. */\n dataType: z.string().default(\"uint16\"),\n});\nexport interface PDOAddress extends z.infer<typeof pdoAddressZ> {}\n\n/** BaseReadChannel carries the fields every EtherCAT read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** device is the key of the slave device the channel reads from. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every EtherCAT write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** device is the key of the slave device the channel writes to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** AutomaticReadChannel resolves its PDO address from the slave's discovered PDOs. */\nexport const automaticReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"automatic\"),\n /** pdo is the name of the PDO entry to resolve on the slave. */\n pdo: z.string().default(\"\"),\n});\nexport interface AutomaticReadChannel extends z.infer<typeof automaticReadChannelZ> {}\n\n/** ManualReadChannel specifies its PDO address inline. */\nexport const manualReadChannelZ = baseReadChannelZ.extend(pdoAddressZ.shape).extend({\n type: z.literal(\"manual\"),\n});\nexport interface ManualReadChannel extends z.infer<typeof manualReadChannelZ> {}\n\nexport const READ_CHANNEL_TYPES = [\"automatic\", \"manual\"] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single EtherCAT read channel (TxPDO, slave to master). The type\n * field selects how the PDO entry is addressed.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n automaticReadChannelZ,\n manualReadChannelZ,\n]);\nexport type ReadChannel = AutomaticReadChannel | ManualReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n automatic: automaticReadChannelZ,\n manual: manualReadChannelZ,\n};\n\n/** AutomaticWriteChannel resolves its PDO address from the slave's discovered PDOs. */\nexport const automaticWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"automatic\"),\n /** pdo is the name of the PDO entry to resolve on the slave. */\n pdo: z.string().default(\"\"),\n});\nexport interface AutomaticWriteChannel extends z.infer<typeof automaticWriteChannelZ> {}\n\n/** ManualWriteChannel specifies its PDO address inline. */\nexport const manualWriteChannelZ = baseWriteChannelZ.extend(pdoAddressZ.shape).extend({\n type: z.literal(\"manual\"),\n});\nexport interface ManualWriteChannel extends z.infer<typeof manualWriteChannelZ> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"automatic\", \"manual\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single EtherCAT write channel (RxPDO, master to slave). The type\n * field selects how the PDO entry is addressed.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n automaticWriteChannelZ,\n manualWriteChannelZ,\n]);\nexport type WriteChannel = AutomaticWriteChannel | ManualWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n automatic: automaticWriteChannelZ,\n manual: manualWriteChannelZ,\n};\n\nexport const readConfigZ = task.readConfigZ.extend({\n channels: readChannelZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.persistConfigZ.extend({\n stateRate: z.number().default(25),\n executionRate: z.number().default(1000),\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/ethercat/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TIME_FORMATS = [\n \"iso8601\",\n \"unix_sec\",\n \"unix_ms\",\n \"unix_us\",\n \"unix_ns\",\n] as const;\nexport const timeFormatZ = z.enum(TIME_FORMATS);\nexport type TimeFormat = z.infer<typeof timeFormatZ>;\n\nexport const METHODS = [\n \"GET\",\n \"HEAD\",\n \"POST\",\n \"PUT\",\n \"DELETE\",\n \"PATCH\",\n \"OPTIONS\",\n \"TRACE\",\n \"CONNECT\",\n] as const;\nexport const methodZ = z.enum(METHODS);\nexport type Method = z.infer<typeof methodZ>;\n\nexport const JSON_TYPES = [\"number\", \"string\", \"boolean\"] as const;\nexport const jsonTypeZ = z.enum(JSON_TYPES);\nexport type JSONType = z.infer<typeof jsonTypeZ>;\n\nexport const GENERATOR_TYPES = [\"uuid\", \"timestamp\"] as const;\nexport const generatorTypeZ = z.enum(GENERATOR_TYPES);\nexport type GeneratorType = z.infer<typeof generatorTypeZ>;\n\n/** Header is a single HTTP header sent with a request. */\nexport const headerZ = z.object({\n /** name is the header name, unique within a request. */\n name: z.string().default(\"\"),\n /** value is the header value. */\n value: z.string().default(\"\"),\n});\nexport interface Header extends z.infer<typeof headerZ> {}\n\n/** QueryParam is a single URL query parameter sent with a request. */\nexport const queryParamZ = z.object({\n /** parameter is the parameter name, unique within a request. */\n parameter: z.string().default(\"\"),\n /** value is the parameter value. */\n value: z.string().default(\"\"),\n});\nexport interface QueryParam extends z.infer<typeof queryParamZ> {}\n\n/**\n * EnumEntry maps a string label in a JSON body to a numeric channel value for\n * enum-style parsing (e.g. \"ON\" -> 1, \"OFF\" -> 0).\n */\nexport const enumEntryZ = z.object({\n /** label is the string label in the JSON body. */\n label: z.string().default(\"\"),\n /** value is the numeric channel value the label maps to. */\n value: z.number().default(0),\n});\nexport interface EnumEntry extends z.infer<typeof enumEntryZ> {}\n\n/** BaseWriteField carries the fields every write body field shares. */\nexport const baseWriteFieldZ = z.object({\n /** key uniquely identifies the field within the endpoint. */\n key: z.string().default(id.create),\n /** pointer is the JSON Pointer where the value is placed in the body. */\n pointer: z.string().default(\"\"),\n});\nexport interface BaseWriteField extends z.infer<typeof baseWriteFieldZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** ReadField is a single value extracted from an endpoint's JSON response. */\nexport const readFieldZ = z.object({\n /** key uniquely identifies the field within the endpoint. */\n key: z.string().default(id.create),\n /** name is the human-readable field name. */\n name: z.string().default(\"\"),\n /** disabled is true when the field is excluded from polling. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel the extracted value is written to. */\n channel: channel.keyZ.default(0),\n /** pointer is the JSON Pointer to the value within the response body. */\n pointer: z.string().default(\"\"),\n /** dataType is the data type of the extracted value. */\n dataType: z.string().default(\"float64\"),\n /**\n * timeFormat is the encoding of the JSON value when the target channel holds\n * timestamps. Required for timestamp channels.\n */\n timeFormat: timeFormatZ.optional(),\n /** enumValues maps string labels in the response to numeric channel values. */\n enumValues: enumEntryZ.array().default(() => []),\n});\nexport interface ReadField extends z.infer<typeof readFieldZ> {}\n\n/** ChannelField is the command channel value placed into a write endpoint's body. */\nexport const channelFieldZ = z.object({\n /**\n * pointer is the JSON Pointer where the channel value is placed in the body. An empty\n * pointer sends the bare value as the entire body, in which case the endpoint may not\n * declare any additional fields.\n */\n pointer: z.string().default(\"\"),\n /** jsonType is the JSON type the channel value is serialized as. */\n jsonType: jsonTypeZ.default(\"number\"),\n /** channel is the Synnax command channel that triggers the request. */\n channel: channel.keyZ.default(0),\n /** name is the human-readable name of the command channel. */\n name: z.string().default(\"\"),\n /** dataType is the data type of the command channel. */\n dataType: z.string().default(\"float64\"),\n /**\n * timeFormat is the output encoding when the command channel holds timestamps.\n * Required for timestamp channels.\n */\n timeFormat: timeFormatZ.optional(),\n /**\n * enumValues maps numeric channel values to string labels. Only valid when json_type\n * is 'string'.\n */\n enumValues: enumEntryZ.array().default(() => []),\n});\nexport interface ChannelField extends z.infer<typeof channelFieldZ> {}\n\n/** StaticWriteField places a fixed value in the request body. */\nexport const staticWriteFieldZ = baseWriteFieldZ.extend({\n type: z.literal(\"static\"),\n /** jsonType is the JSON type the value is serialized as. */\n jsonType: jsonTypeZ.default(\"number\"),\n /** value is the fixed JSON value placed at the pointer. */\n value: z.unknown(),\n});\nexport interface StaticWriteField extends z.infer<typeof staticWriteFieldZ> {}\n\n/** GeneratedWriteField places a freshly generated UUID or timestamp in the body. */\nexport const generatedWriteFieldZ = baseWriteFieldZ.extend({\n type: z.literal(\"generated\"),\n /** generator is the generator that produces a fresh value per request. */\n generator: generatorTypeZ.default(\"uuid\"),\n /**\n * timeFormat is the output encoding for timestamp generators. Defaults to iso8601.\n */\n timeFormat: timeFormatZ.optional(),\n});\nexport interface GeneratedWriteField extends z.infer<typeof generatedWriteFieldZ> {}\n\nexport const WRITE_FIELD_TYPES = [\"static\", \"generated\"] as const;\nexport const writeFieldTypeZ = z.enum(WRITE_FIELD_TYPES);\nexport type WriteFieldType = z.infer<typeof writeFieldTypeZ>;\n\n/**\n * WriteField is an additional body field on a write endpoint. The type field selects\n * whether the value is fixed or generated per request.\n */\nexport const writeFieldZ = z.discriminatedUnion(\"type\", [\n staticWriteFieldZ,\n generatedWriteFieldZ,\n]);\nexport type WriteField = StaticWriteField | GeneratedWriteField;\n\nexport const WRITE_FIELD_SCHEMAS: {\n [K in WriteFieldType]: z.ZodType<Extract<WriteField, { type: K }>>;\n} = {\n static: staticWriteFieldZ,\n generated: generatedWriteFieldZ,\n};\n\n/** ReadEndpoint is a single HTTP endpoint polled by a read task. */\nexport const readEndpointZ = z.object({\n /** key uniquely identifies the endpoint within the task. */\n key: z.string().default(id.create),\n /** method is the HTTP method used to poll the endpoint. */\n method: methodZ.default(\"GET\"),\n /** path is the URL path appended to the device's base URL. */\n path: z.string().default(\"\"),\n /** headers contains additional headers merged into the request. */\n headers: headerZ.array().default(() => []),\n /** queryParams contains query parameters appended to the request URL. */\n queryParams: queryParamZ.array().default(() => []),\n /** body is a static body sent with each request. Empty sends no body. */\n body: z.string().default(\"\"),\n /** fields contains the values to extract from the response. */\n fields: readFieldZ.array().default(() => []),\n /**\n * index is the key of the field whose channel indexes the others. Empty when the task\n * stamps samples on arrival.\n */\n index: z.string().default(\"\"),\n});\nexport interface ReadEndpoint extends z.infer<typeof readEndpointZ> {}\n\n/** WriteEndpoint is a single HTTP endpoint written to by a write task. */\nexport const writeEndpointZ = z.object({\n /** key uniquely identifies the endpoint within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the endpoint is excluded from the task. */\n disabled: z.boolean().default(false),\n /** method is the HTTP method used to send the request. */\n method: methodZ.default(\"POST\"),\n /** path is the URL path appended to the device's base URL. */\n path: z.string().default(\"\"),\n /** headers contains additional headers merged into the request. */\n headers: headerZ.array().default(() => []),\n /** queryParams contains query parameters appended to the request URL. */\n queryParams: queryParamZ.array().default(() => []),\n /** channel is the command channel whose writes trigger this endpoint. */\n channel: channelFieldZ.prefault({}),\n /** fields contains additional static or generated body fields. */\n fields: writeFieldZ.array().default(() => []),\n});\nexport interface WriteEndpoint extends z.infer<typeof writeEndpointZ> {}\n\nexport const readConfigZ = task.persistConfigZ.extend({\n device: device.keyZ.default(\"\"),\n rate: z.number().default(1),\n endpoints: readEndpointZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.startConfigZ.extend({\n device: device.keyZ.default(\"\"),\n endpoints: writeEndpointZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/http/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TEMPERATURE_UNITS = [\"C\", \"F\", \"K\"] as const;\nexport const temperatureUnitsZ = z.enum(TEMPERATURE_UNITS);\nexport type TemperatureUnits = z.infer<typeof temperatureUnitsZ>;\n\nexport const THERMOCOUPLE_TYPES = [\n \"J\",\n \"K\",\n \"N\",\n \"R\",\n \"S\",\n \"T\",\n \"B\",\n \"E\",\n \"C\",\n] as const;\nexport const thermocoupleTypeZ = z.enum(THERMOCOUPLE_TYPES);\nexport type ThermocoupleType = z.infer<typeof thermocoupleTypeZ>;\n\n/** BaseReadChannel carries the fields every LabJack read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from (e.g. 'AIN0', 'DIO4'). */\n port: z.string().default(\"\"),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every LabJack write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to (e.g. 'DAC0', 'DIO4'). */\n port: z.string().default(\"\"),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ.extend({\n tcpScanMultiplier: z.int32().default(10),\n});\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** LinearScale maps raw values to engineering units with a slope and offset. */\nexport const linearScaleZ = z.object({\n type: z.literal(\"linear\"),\n /** slope is the multiplier applied to the raw value. */\n slope: z.number().default(1),\n /** offset is the offset added after scaling. */\n offset: z.number().default(0),\n});\nexport interface LinearScale extends z.infer<typeof linearScaleZ> {}\n\n/** MapScale maps a raw range linearly onto a scaled range. */\nexport const mapScaleZ = z.object({\n type: z.literal(\"map\"),\n /** preScaledMin is the lower bound of the raw input range. */\n preScaledMin: z.number().default(0),\n /** preScaledMax is the upper bound of the raw input range. */\n preScaledMax: z.number().default(1),\n /** scaledMin is the lower bound of the scaled output range. */\n scaledMin: z.number().default(0),\n /** scaledMax is the upper bound of the scaled output range. */\n scaledMax: z.number().default(1),\n});\nexport interface MapScale extends z.infer<typeof mapScaleZ> {}\n\n/** NoneScale applies no scaling; the raw value is used directly. */\nexport const noneScaleZ = z.object({\n type: z.literal(\"none\"),\n});\nexport interface NoneScale extends z.infer<typeof noneScaleZ> {}\n\nexport const SCALE_TYPES = [\"linear\", \"map\", \"none\"] as const;\nexport const scaleTypeZ = z.enum(SCALE_TYPES);\nexport type ScaleType = z.infer<typeof scaleTypeZ>;\n\n/** Scale determines how raw sensor values are transformed to engineering units. */\nexport const scaleZ = z.discriminatedUnion(\"type\", [\n linearScaleZ,\n mapScaleZ,\n noneScaleZ,\n]);\nexport type Scale = LinearScale | MapScale | NoneScale;\n\nexport const SCALE_SCHEMAS: {\n [K in ScaleType]: z.ZodType<Extract<Scale, { type: K }>>;\n} = {\n linear: linearScaleZ,\n map: mapScaleZ,\n none: noneScaleZ,\n};\n\n/** AnalogWriteChannel drives an analog output on a DAC port. */\nexport const analogWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"analog\"),\n port: z.string().default(\"DAC0\"),\n});\nexport interface AnalogWriteChannel extends z.infer<typeof analogWriteChannelZ> {}\n\n/** DigitalWriteChannel drives a digital output line on a DIO port. */\nexport const digitalWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"digital\"),\n port: z.string().default(\"DIO4\"),\n});\nexport interface DigitalWriteChannel extends z.infer<typeof digitalWriteChannelZ> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"analog\", \"digital\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single LabJack write channel. The type field selects the output\n * mode.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n analogWriteChannelZ,\n digitalWriteChannelZ,\n]);\nexport type WriteChannel = AnalogWriteChannel | DigitalWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n analog: analogWriteChannelZ,\n digital: digitalWriteChannelZ,\n};\n\n/** AnalogReadChannel reads a voltage from an analog input port. */\nexport const analogReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"analog\"),\n port: z.string().default(\"AIN0\"),\n /** range is the upper bound of the voltage input range, in Volts. */\n range: z.number().default(10),\n /**\n * negChan is the negative channel for differential readings on T7 devices. 199\n * selects single-ended.\n */\n negChan: z.int32().default(199),\n /** scale is the scale applied to raw samples after acquisition. */\n scale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface AnalogReadChannel extends z.infer<typeof analogReadChannelZ> {}\n\n/** DigitalReadChannel reads a digital input line. */\nexport const digitalReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"digital\"),\n port: z.string().default(\"DIO4\"),\n});\nexport interface DigitalReadChannel extends z.infer<typeof digitalReadChannelZ> {}\n\n/** ThermocoupleReadChannel reads temperature from a thermocouple. */\nexport const thermocoupleReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"thermocouple\"),\n /** port is the AIN port the thermocouple's positive lead is wired to. */\n port: z.string().default(\"AIN0\"),\n /** thermocoupleType selects the thermocouple alloy type. */\n thermocoupleType: thermocoupleTypeZ.default(\"K\"),\n /**\n * negChan is the AIN port of the thermocouple's negative lead on T7 devices. 199\n * selects single-ended.\n */\n negChan: z.int32().default(199),\n /**\n * cjcSource selects the cold-junction-compensation source: the device sensor\n * ('TEMPERATURE_DEVICE_K'), ambient air ('TEMPERATURE_AIR_K'), or an AIN port (e.g.\n * 'AIN2').\n */\n cjcSource: z.string().default(\"TEMPERATURE_DEVICE_K\"),\n /** cjcSlope is the CJC voltage-to-temperature slope, in Kelvin per Volt. */\n cjcSlope: z.number().default(1),\n /** cjcOffset is the CJC temperature offset, in Kelvins. */\n cjcOffset: z.number().default(0),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"K\"),\n /** scale is the scale applied to raw samples after acquisition. */\n scale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface ThermocoupleReadChannel extends z.infer<\n typeof thermocoupleReadChannelZ\n> {}\n\nexport const READ_CHANNEL_TYPES = [\"analog\", \"digital\", \"thermocouple\"] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single LabJack read channel. The type field selects the input mode\n * and the fields that accompany it.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n analogReadChannelZ,\n digitalReadChannelZ,\n thermocoupleReadChannelZ,\n]);\nexport type ReadChannel =\n AnalogReadChannel | DigitalReadChannel | ThermocoupleReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n analog: analogReadChannelZ,\n digital: digitalReadChannelZ,\n thermocouple: thermocoupleReadChannelZ,\n};\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n stateRate: z.number().default(10),\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n\nexport const readConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: readChannelZ.array().default(() => []),\n deviceScanBacklogWarnOnCount: z.uint32().default(0),\n ljmScanBacklogWarnOnCount: z.uint32().default(0),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/labjack/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id, zod } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** RegisterValue interprets one or more 16-bit registers as a single typed value. */\nexport const registerValueZ = z.object({\n /** dataType is the data type the register contents are interpreted as. */\n dataType: z.string().default(\"uint8\"),\n /** bytesSwapped is true when the byte order within each 16-bit word is swapped. */\n bytesSwapped: z.boolean().default(false),\n /** wordsSwapped is true when the word order of multi-register values is swapped. */\n wordsSwapped: z.boolean().default(false),\n});\nexport interface RegisterValue extends z.infer<typeof registerValueZ> {}\n\n/** BaseReadChannel carries the fields every Modbus read channel shares. */\nexport const baseReadChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that samples are written to. */\n channel: channel.keyZ.default(0),\n /** address is the Modbus address the channel reads from. */\n address: zod.uint16.default(0),\n});\nexport interface BaseReadChannel extends z.infer<typeof baseReadChannelZ> {}\n\n/** BaseWriteChannel carries the fields every Modbus write channel shares. */\nexport const baseWriteChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel commands are read from. */\n channel: channel.keyZ.default(0),\n /** address is the Modbus address the channel writes to. */\n address: zod.uint16.default(0),\n});\nexport interface BaseWriteChannel extends z.infer<typeof baseWriteChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** CoilReadChannel reads a single bit from a coil. */\nexport const coilReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"coil\"),\n});\nexport interface CoilReadChannel extends z.infer<typeof coilReadChannelZ> {}\n\n/** DiscreteInputReadChannel reads a single bit from a discrete input. */\nexport const discreteInputReadChannelZ = baseReadChannelZ.extend({\n type: z.literal(\"discrete_input\"),\n});\nexport interface DiscreteInputReadChannel extends z.infer<\n typeof discreteInputReadChannelZ\n> {}\n\n/**\n * HoldingRegisterReadChannel reads a typed value from one or more holding registers.\n */\nexport const holdingRegisterReadChannelZ = baseReadChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"holding_register\"),\n /** stringLength is the length, in characters, when data_type is a string. */\n stringLength: z.int32().default(0),\n });\nexport interface HoldingRegisterReadChannel extends z.infer<\n typeof holdingRegisterReadChannelZ\n> {}\n\n/** InputRegisterReadChannel reads a typed value from one or more input registers. */\nexport const inputRegisterReadChannelZ = baseReadChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"input_register\"),\n /** stringLength is the length, in characters, when data_type is a string. */\n stringLength: z.int32().default(0),\n });\nexport interface InputRegisterReadChannel extends z.infer<\n typeof inputRegisterReadChannelZ\n> {}\n\nexport const READ_CHANNEL_TYPES = [\n \"coil\",\n \"discrete_input\",\n \"holding_register\",\n \"input_register\",\n] as const;\nexport const readChannelTypeZ = z.enum(READ_CHANNEL_TYPES);\nexport type ReadChannelType = z.infer<typeof readChannelTypeZ>;\n\n/**\n * ReadChannel is a single Modbus read channel. The type field selects the register\n * space the channel reads from and the fields that accompany it.\n */\nexport const readChannelZ = z.discriminatedUnion(\"type\", [\n coilReadChannelZ,\n discreteInputReadChannelZ,\n holdingRegisterReadChannelZ,\n inputRegisterReadChannelZ,\n]);\nexport type ReadChannel =\n | CoilReadChannel\n | DiscreteInputReadChannel\n | HoldingRegisterReadChannel\n | InputRegisterReadChannel;\n\nexport const READ_CHANNEL_SCHEMAS: {\n [K in ReadChannelType]: z.ZodType<Extract<ReadChannel, { type: K }>>;\n} = {\n coil: coilReadChannelZ,\n discrete_input: discreteInputReadChannelZ,\n holding_register: holdingRegisterReadChannelZ,\n input_register: inputRegisterReadChannelZ,\n};\n\n/** CoilWriteChannel writes a single bit to a coil. */\nexport const coilWriteChannelZ = baseWriteChannelZ.extend({\n type: z.literal(\"coil\"),\n});\nexport interface CoilWriteChannel extends z.infer<typeof coilWriteChannelZ> {}\n\n/**\n * HoldingRegisterWriteChannel writes a typed value to one or more holding registers.\n */\nexport const holdingRegisterWriteChannelZ = baseWriteChannelZ\n .extend(registerValueZ.shape)\n .extend({\n type: z.literal(\"holding_register\"),\n });\nexport interface HoldingRegisterWriteChannel extends z.infer<\n typeof holdingRegisterWriteChannelZ\n> {}\n\nexport const WRITE_CHANNEL_TYPES = [\"coil\", \"holding_register\"] as const;\nexport const writeChannelTypeZ = z.enum(WRITE_CHANNEL_TYPES);\nexport type WriteChannelType = z.infer<typeof writeChannelTypeZ>;\n\n/**\n * WriteChannel is a single Modbus write channel. The type field selects the register\n * space the channel writes to and the fields that accompany it.\n */\nexport const writeChannelZ = z.discriminatedUnion(\"type\", [\n coilWriteChannelZ,\n holdingRegisterWriteChannelZ,\n]);\nexport type WriteChannel = CoilWriteChannel | HoldingRegisterWriteChannel;\n\nexport const WRITE_CHANNEL_SCHEMAS: {\n [K in WriteChannelType]: z.ZodType<Extract<WriteChannel, { type: K }>>;\n} = {\n coil: coilWriteChannelZ,\n holding_register: holdingRegisterWriteChannelZ,\n};\n\nexport const readConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: readChannelZ.array().default(() => []),\n});\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/modbus/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\nexport const TERMINAL_CONFIGS = [\n \"Cfg_Default\",\n \"RSE\",\n \"NRSE\",\n \"Diff\",\n \"PseudoDiff\",\n] as const;\nexport const terminalConfigZ = z.enum(TERMINAL_CONFIGS);\nexport type TerminalConfig = z.infer<typeof terminalConfigZ>;\n\nexport const EXCITATION_SOURCES = [\"Internal\", \"External\", \"None\"] as const;\nexport const excitationSourceZ = z.enum(EXCITATION_SOURCES);\nexport type ExcitationSource = z.infer<typeof excitationSourceZ>;\n\nexport const BRIDGE_CONFIGS = [\"FullBridge\", \"HalfBridge\", \"QuarterBridge\"] as const;\nexport const bridgeConfigZ = z.enum(BRIDGE_CONFIGS);\nexport type BridgeConfig = z.infer<typeof bridgeConfigZ>;\n\nexport const ELECTRICAL_UNITS = [\"mVoltsPerVolt\", \"VoltsPerVolt\"] as const;\nexport const electricalUnitsZ = z.enum(ELECTRICAL_UNITS);\nexport type ElectricalUnits = z.infer<typeof electricalUnitsZ>;\n\nexport const RESISTANCE_CONFIGS = [\"2Wire\", \"3Wire\", \"4Wire\"] as const;\nexport const resistanceConfigZ = z.enum(RESISTANCE_CONFIGS);\nexport type ResistanceConfig = z.infer<typeof resistanceConfigZ>;\n\nexport const Z_INDEX_PHASES = [\n \"AHighBHigh\",\n \"AHighBLow\",\n \"ALowBHigh\",\n \"ALowBLow\",\n] as const;\nexport const zIndexPhaseZ = z.enum(Z_INDEX_PHASES);\nexport type ZIndexPhase = z.infer<typeof zIndexPhaseZ>;\n\nexport const UNITS = [\n \"Volts\",\n \"Amps\",\n \"DegF\",\n \"DegC\",\n \"DegR\",\n \"Kelvins\",\n \"Strain\",\n \"Ohms\",\n \"Hz\",\n \"Seconds\",\n \"Meters\",\n \"Inches\",\n \"Degrees\",\n \"Radians\",\n \"g\",\n \"MetersPerSecondSquared\",\n \"Newtons\",\n \"Pounds\",\n \"KilogramForce\",\n \"PoundsPerSquareInch\",\n \"Bar\",\n \"Pascals\",\n \"VoltsPerVolt\",\n \"mVoltsPerVolt\",\n \"NewtonMeters\",\n \"InchPounds\",\n \"InchOunces\",\n \"FootPounds\",\n] as const;\nexport const unitsZ = z.enum(UNITS);\nexport type Units = z.infer<typeof unitsZ>;\n\nexport const ACCEL_SENSITIVITY_UNITS = [\"mVoltsPerG\", \"VoltsPerG\"] as const;\nexport const accelSensitivityUnitsZ = z.enum(ACCEL_SENSITIVITY_UNITS);\nexport type AccelSensitivityUnits = z.infer<typeof accelSensitivityUnitsZ>;\n\nexport const ACCEL_UNITS = [\n \"g\",\n \"MetersPerSecondSquared\",\n \"InchesPerSecondSquared\",\n] as const;\nexport const accelUnitsZ = z.enum(ACCEL_UNITS);\nexport type AccelUnits = z.infer<typeof accelUnitsZ>;\n\nexport const FORCE_UNITS = [\"Newtons\", \"Pounds\", \"KilogramForce\"] as const;\nexport const forceUnitsZ = z.enum(FORCE_UNITS);\nexport type ForceUnits = z.infer<typeof forceUnitsZ>;\n\nexport const SHUNT_RESISTOR_LOCATIONS = [\"Default\", \"Internal\", \"External\"] as const;\nexport const shuntResistorLocationZ = z.enum(SHUNT_RESISTOR_LOCATIONS);\nexport type ShuntResistorLocation = z.infer<typeof shuntResistorLocationZ>;\n\nexport const FORCE_SENSITIVITY_UNITS = [\"mVoltsPerNewton\", \"mVoltsPerPound\"] as const;\nexport const forceSensitivityUnitsZ = z.enum(FORCE_SENSITIVITY_UNITS);\nexport type ForceSensitivityUnits = z.infer<typeof forceSensitivityUnitsZ>;\n\nexport const PRESSURE_UNITS = [\"PoundsPerSquareInch\", \"Pascals\", \"Bar\"] as const;\nexport const pressureUnitsZ = z.enum(PRESSURE_UNITS);\nexport type PressureUnits = z.infer<typeof pressureUnitsZ>;\n\nexport const TORQUE_UNITS = [\n \"NewtonMeters\",\n \"InchOunces\",\n \"InchPounds\",\n \"FootPounds\",\n] as const;\nexport const torqueUnitsZ = z.enum(TORQUE_UNITS);\nexport type TorqueUnits = z.infer<typeof torqueUnitsZ>;\n\nexport const TEMPERATURE_UNITS = [\"DegC\", \"DegF\", \"Kelvins\", \"DegR\"] as const;\nexport const temperatureUnitsZ = z.enum(TEMPERATURE_UNITS);\nexport type TemperatureUnits = z.infer<typeof temperatureUnitsZ>;\n\nexport const RTD_TYPES = [\n \"Pt3750\",\n \"Pt3851\",\n \"Pt3911\",\n \"Pt3916\",\n \"Pt3920\",\n \"Pt3928\",\n] as const;\nexport const rtdTypeZ = z.enum(RTD_TYPES);\nexport type RTDType = z.infer<typeof rtdTypeZ>;\n\nexport const STRAIN_CONFIGS = [\n \"FullBridgeI\",\n \"FullBridgeII\",\n \"FullBridgeIII\",\n \"HalfBridgeI\",\n \"HalfBridgeII\",\n \"QuarterBridgeI\",\n \"QuarterBridgeII\",\n] as const;\nexport const strainConfigZ = z.enum(STRAIN_CONFIGS);\nexport type StrainConfig = z.infer<typeof strainConfigZ>;\n\nexport const THERMOCOUPLE_TYPES = [\"J\", \"K\", \"N\", \"R\", \"S\", \"T\", \"B\", \"E\"] as const;\nexport const thermocoupleTypeZ = z.enum(THERMOCOUPLE_TYPES);\nexport type ThermocoupleType = z.infer<typeof thermocoupleTypeZ>;\n\nexport const VELOCITY_UNITS = [\"MetersPerSecond\", \"InchesPerSecond\"] as const;\nexport const velocityUnitsZ = z.enum(VELOCITY_UNITS);\nexport type VelocityUnits = z.infer<typeof velocityUnitsZ>;\n\nexport const VELOCITY_SENSITIVITY_UNITS = [\n \"MillivoltsPerMillimeterPerSecond\",\n \"MilliVoltsPerInchPerSecond\",\n] as const;\nexport const velocitySensitivityUnitsZ = z.enum(VELOCITY_SENSITIVITY_UNITS);\nexport type VelocitySensitivityUnits = z.infer<typeof velocitySensitivityUnitsZ>;\n\nexport const CHARGE_UNITS = [\"Coulombs\", \"PicoCoulombs\"] as const;\nexport const chargeUnitsZ = z.enum(CHARGE_UNITS);\nexport type ChargeUnits = z.infer<typeof chargeUnitsZ>;\n\nexport const CI_EDGES = [\"Rising\", \"Falling\"] as const;\nexport const ciEdgeZ = z.enum(CI_EDGES);\nexport type CIEdge = z.infer<typeof ciEdgeZ>;\n\nexport const CI_MEAS_METHODS = [\n \"LowFreq1Ctr\",\n \"HighFreq2Ctr\",\n \"LargeRng2Ctr\",\n \"DynamicAvg\",\n] as const;\nexport const ciMeasMethodZ = z.enum(CI_MEAS_METHODS);\nexport type CIMeasMethod = z.infer<typeof ciMeasMethodZ>;\n\nexport const CI_FREQ_UNITS = [\"Hz\", \"Ticks\"] as const;\nexport const ciFreqUnitsZ = z.enum(CI_FREQ_UNITS);\nexport type CIFreqUnits = z.infer<typeof ciFreqUnitsZ>;\n\nexport const CI_TIME_UNITS = [\"Seconds\", \"Ticks\"] as const;\nexport const ciTimeUnitsZ = z.enum(CI_TIME_UNITS);\nexport type CITimeUnits = z.infer<typeof ciTimeUnitsZ>;\n\nexport const CI_COUNT_DIRECTIONS = [\n \"CountUp\",\n \"CountDown\",\n \"ExternallyControlled\",\n] as const;\nexport const ciCountDirectionZ = z.enum(CI_COUNT_DIRECTIONS);\nexport type CICountDirection = z.infer<typeof ciCountDirectionZ>;\n\nexport const CI_DECODING_TYPES = [\"X1\", \"X2\", \"X4\", \"TwoPulse\"] as const;\nexport const ciDecodingTypeZ = z.enum(CI_DECODING_TYPES);\nexport type CIDecodingType = z.infer<typeof ciDecodingTypeZ>;\n\nexport const CI_LINEAR_VELOCITY_UNITS = [\"m/s\", \"in/s\"] as const;\nexport const ciLinearVelocityUnitsZ = z.enum(CI_LINEAR_VELOCITY_UNITS);\nexport type CILinearVelocityUnits = z.infer<typeof ciLinearVelocityUnitsZ>;\n\nexport const CI_ANGULAR_VELOCITY_UNITS = [\"RPM\", \"Radians/s\", \"Degrees/s\"] as const;\nexport const ciAngularVelocityUnitsZ = z.enum(CI_ANGULAR_VELOCITY_UNITS);\nexport type CIAngularVelocityUnits = z.infer<typeof ciAngularVelocityUnitsZ>;\n\nexport const CI_LINEAR_POSITION_UNITS = [\"Meters\", \"Inches\", \"Ticks\"] as const;\nexport const ciLinearPositionUnitsZ = z.enum(CI_LINEAR_POSITION_UNITS);\nexport type CILinearPositionUnits = z.infer<typeof ciLinearPositionUnitsZ>;\n\nexport const CI_ANGULAR_POSITION_UNITS = [\"Degrees\", \"Radians\", \"Ticks\"] as const;\nexport const ciAngularPositionUnitsZ = z.enum(CI_ANGULAR_POSITION_UNITS);\nexport type CIAngularPositionUnits = z.infer<typeof ciAngularPositionUnitsZ>;\n\nexport const WAVE_TYPES = [\"Sine\", \"Triangle\", \"Square\", \"Sawtooth\"] as const;\nexport const waveTypeZ = z.enum(WAVE_TYPES);\nexport type WaveType = z.infer<typeof waveTypeZ>;\n\nexport const ACCEL_CHARGE_SENSITIVITY_UNITS = [\n \"PicoCoulombsPerG\",\n \"PicoCoulombsPerMetersPerSecondSquared\",\n \"PicoCoulombsPerInchesPerSecondSquared\",\n] as const;\nexport const accelChargeSensitivityUnitsZ = z.enum(ACCEL_CHARGE_SENSITIVITY_UNITS);\nexport type AccelChargeSensitivityUnits = z.infer<typeof accelChargeSensitivityUnitsZ>;\n\n/** MinMaxVal bounds the expected signal range in scaled units. */\nexport const minMaxValZ = z.object({\n /** minVal is the minimum expected value, in scaled units. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected value, in scaled units. */\n maxVal: z.number().default(1),\n});\nexport interface MinMaxVal extends z.infer<typeof minMaxValZ> {}\n\n/** Terminal configures the terminal wiring of an analog input channel. */\nexport const terminalZ = z.object({\n /** terminalConfig selects the terminal configuration (RSE, NRSE, Diff, ...). */\n terminalConfig: terminalConfigZ.default(\"Cfg_Default\"),\n});\nexport interface Terminal extends z.infer<typeof terminalZ> {}\n\n/** Sensitivity specifies a sensor's sensitivity rating. */\nexport const sensitivityZ = z.object({\n /** sensitivity is the sensor's sensitivity rating. */\n sensitivity: z.number().default(0),\n});\nexport interface Sensitivity extends z.infer<typeof sensitivityZ> {}\n\n/** CurrentExcitation configures the current excitation supplied to a sensor. */\nexport const currentExcitationZ = z.object({\n /** currentExcitSource selects the source of the current excitation signal. */\n currentExcitSource: excitationSourceZ.default(\"Internal\"),\n /** currentExcitVal is the current excitation level, in Amps. */\n currentExcitVal: z.number().default(0),\n});\nexport interface CurrentExcitation extends z.infer<typeof currentExcitationZ> {}\n\n/** VoltageExcitation configures the voltage excitation supplied to a sensor. */\nexport const voltageExcitationZ = z.object({\n /** voltageExcitSource selects the source of the voltage excitation signal. */\n voltageExcitSource: excitationSourceZ.default(\"Internal\"),\n /** voltageExcitVal is the voltage excitation level, in Volts. */\n voltageExcitVal: z.number().default(0),\n});\nexport interface VoltageExcitation extends z.infer<typeof voltageExcitationZ> {}\n\n/** Bridge configures the wiring and nominal resistance of a bridge-based sensor. */\nexport const bridgeZ = z.object({\n /** bridgeConfig selects the physical bridge wiring. */\n bridgeConfig: bridgeConfigZ.default(\"FullBridge\"),\n /** nominalBridgeResistance is the nominal resistance of the bridge, in Ohms. */\n nominalBridgeResistance: z.number().default(1),\n});\nexport interface Bridge extends z.infer<typeof bridgeZ> {}\n\n/**\n * BridgePolynomial scales bridge electrical output to physical units with a polynomial.\n */\nexport const bridgePolynomialZ = z.object({\n /** forwardCoeffs are the coefficients mapping electrical to physical values. */\n forwardCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** reverseCoeffs are the coefficients mapping physical to electrical values. */\n reverseCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** electricalUnits are the electrical output units of the bridge. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n});\nexport interface BridgePolynomial extends z.infer<typeof bridgePolynomialZ> {}\n\n/** Resistance configures the wiring of a resistance measurement. */\nexport const resistanceZ = z.object({\n /**\n * resistanceConfig selects the number of wires used for the resistance measurement.\n */\n resistanceConfig: resistanceConfigZ.default(\"2Wire\"),\n});\nexport interface Resistance extends z.infer<typeof resistanceZ> {}\n\n/** Table scales bridge electrical output to physical units with a lookup table. */\nexport const tableZ = z.object({\n /** electricalVals are the electrical breakpoints of the calibration table. */\n electricalVals: z\n .number()\n .array()\n .default(() => []),\n /** electricalUnits are the units of the electrical breakpoints. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n /**\n * physicalVals are the physical values corresponding to each electrical breakpoint.\n */\n physicalVals: z\n .number()\n .array()\n .default(() => []),\n});\nexport interface Table extends z.infer<typeof tableZ> {}\n\n/**\n * TwoPointLin scales bridge electrical output to physical units between two calibration\n * points.\n */\nexport const twoPointLinZ = z.object({\n /** firstElectricalVal is the first electrical calibration point. */\n firstElectricalVal: z.number().default(0),\n /** secondElectricalVal is the second electrical calibration point. */\n secondElectricalVal: z.number().default(1),\n /** electricalUnits are the units of the electrical calibration points. */\n electricalUnits: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n /** firstPhysicalVal is the physical value at the first electrical point. */\n firstPhysicalVal: z.number().default(0),\n /** secondPhysicalVal is the physical value at the second electrical point. */\n secondPhysicalVal: z.number().default(1),\n});\nexport interface TwoPointLin extends z.infer<typeof twoPointLinZ> {}\n\n/** BaseAIChannel carries the fields every NI analog input channel shares. */\nexport const baseAIChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from. */\n port: z.int32().default(0),\n /** device is the key of the device the channel belongs to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseAIChannel extends z.infer<typeof baseAIChannelZ> {}\n\n/** ZIndex configures the Z-index reset behavior of an encoder. */\nexport const zIndexZ = z.object({\n /** zIndexEnabled is true when the encoder's Z index resets the count. */\n zIndexEnabled: z.boolean().default(false),\n /** zIndexVal is the value the measurement resets to when the Z index is active. */\n zIndexVal: z.number().default(0),\n /** zIndexPhase selects the A/B states at which the Z index is active. */\n zIndexPhase: zIndexPhaseZ.default(\"AHighBHigh\"),\n /** terminalZ is the terminal the Z index signal is wired to. */\n terminalZ: z.string().default(\"\"),\n});\nexport interface ZIndex extends z.infer<typeof zIndexZ> {}\n\n/** BaseCIChannel carries the fields every NI counter input channel shares. */\nexport const baseCIChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical counter the channel uses. */\n port: z.int32().default(0),\n /** device is the key of the device the counter belongs to. */\n device: device.keyZ.default(\"\"),\n});\nexport interface BaseCIChannel extends z.infer<typeof baseCIChannelZ> {}\n\n/** BaseAOChannel carries the fields every NI analog output channel shares. */\nexport const baseAOChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to. */\n port: z.int32().default(0),\n});\nexport interface BaseAOChannel extends z.infer<typeof baseAOChannelZ> {}\n\n/** DIChannel is a digital input channel the task acquires from. */\nexport const diChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from acquisition. */\n disabled: z.boolean().default(false),\n /** channel is the Synnax channel that raw samples are written to. */\n channel: channel.keyZ.default(0),\n /** port is the physical port the channel reads from. */\n port: z.int32().default(0),\n /** line is the digital line within the port the channel reads from. */\n line: z.int32().default(0),\n});\nexport interface DIChannel extends z.infer<typeof diChannelZ> {}\n\n/** DOChannel is a digital output channel the task drives. */\nexport const doChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** cmdChannel is the Synnax channel commands are read from. */\n cmdChannel: channel.keyZ.default(0),\n /** stateChannel is the Synnax channel the output state is written to. */\n stateChannel: channel.keyZ.default(0),\n /** cmdChannelName is the human-readable name of the command channel. */\n cmdChannelName: z.string().default(\"\"),\n /** stateChannelName is the human-readable name of the state channel. */\n stateChannelName: z.string().default(\"\"),\n /** port is the physical port the channel writes to. */\n port: z.int32().default(0),\n /** line is the digital line within the port the channel writes to. */\n line: z.int32().default(0),\n});\nexport interface DOChannel extends z.infer<typeof doChannelZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n stateRate: z.number().default(10),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n\nexport const scanConfigZ = task.scanConfigZ.extend({\n ignoredModels: z.string().array().default([\"^cRIO.*\", \"^nown.*\"]),\n});\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\n/** BuiltInCJC reads the reference temperature from the device's own sensor. */\nexport const builtInCJCZ = z.object({\n source: z.literal(\"built_in\"),\n});\nexport interface BuiltInCJC extends z.infer<typeof builtInCJCZ> {}\n\n/** ConstValCJC uses a fixed reference temperature. */\nexport const constValCJCZ = z.object({\n source: z.literal(\"const_val\"),\n /** val is the reference temperature, in the channel's units. */\n val: z.number().default(0),\n});\nexport interface ConstValCJC extends z.infer<typeof constValCJCZ> {}\n\n/** ChanCJC reads the reference temperature from another channel. */\nexport const chanCJCZ = z.object({\n source: z.literal(\"chan\"),\n /** port is the port of the channel that measures the reference. */\n port: z.int32().default(0),\n});\nexport interface ChanCJC extends z.infer<typeof chanCJCZ> {}\n\nexport const CJC_TYPES = [\"built_in\", \"const_val\", \"chan\"] as const;\nexport const cjcTypeZ = z.enum(CJC_TYPES);\nexport type CJCType = z.infer<typeof cjcTypeZ>;\n\n/**\n * CJC is the cold-junction compensation for a thermocouple. The source selects where\n * the reference temperature comes from.\n */\nexport const cjcZ = z.discriminatedUnion(\"source\", [\n builtInCJCZ,\n constValCJCZ,\n chanCJCZ,\n]);\nexport type CJC = BuiltInCJC | ConstValCJC | ChanCJC;\n\nexport const CJC_SCHEMAS: {\n [K in CJCType]: z.ZodType<Extract<CJC, { source: K }>>;\n} = {\n built_in: builtInCJCZ,\n const_val: constValCJCZ,\n chan: chanCJCZ,\n};\n\n/** LinearScale maps raw values to engineering units with a slope and intercept. */\nexport const linearScaleZ = z.object({\n type: z.literal(\"linear\"),\n /** slope is the multiplier applied to the raw value. */\n slope: z.number().default(1),\n /** yIntercept is the offset added after scaling. */\n yIntercept: z.number().default(0),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface LinearScale extends z.infer<typeof linearScaleZ> {}\n\n/** MapScale maps a raw range linearly onto a scaled range. */\nexport const mapScaleZ = z.object({\n type: z.literal(\"map\"),\n /** preScaledMin is the lower bound of the raw input range. */\n preScaledMin: z.number().default(0),\n /** preScaledMax is the upper bound of the raw input range. */\n preScaledMax: z.number().default(1),\n /** scaledMin is the lower bound of the scaled output range. */\n scaledMin: z.number().default(0),\n /** scaledMax is the upper bound of the scaled output range. */\n scaledMax: z.number().default(1),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface MapScale extends z.infer<typeof mapScaleZ> {}\n\n/** TableScale maps raw values to engineering units via a lookup table. */\nexport const tableScaleZ = z.object({\n type: z.literal(\"table\"),\n /** preScaledVals are the raw breakpoints, monotonically increasing. */\n preScaledVals: z\n .number()\n .array()\n .default(() => []),\n /** scaledVals are the engineering-unit values at each breakpoint. */\n scaledVals: z\n .number()\n .array()\n .default(() => []),\n /** preScaledUnits are the units of the raw values before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the values after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface TableScale extends z.infer<typeof tableScaleZ> {}\n\n/** PolynomialScale maps raw values to engineering units with a polynomial. */\nexport const polynomialScaleZ = z.object({\n type: z.literal(\"polynomial\"),\n /** forwardCoeffs are the coefficients mapping pre-scaled to scaled values. */\n forwardCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** reverseCoeffs are the coefficients mapping scaled to pre-scaled values. */\n reverseCoeffs: z\n .number()\n .array()\n .default(() => []),\n /** preScaledUnits are the units of the raw value before scaling. */\n preScaledUnits: unitsZ.default(\"Volts\"),\n /** scaledUnits are the units of the value after scaling. */\n scaledUnits: z.string().default(\"Volts\"),\n});\nexport interface PolynomialScale extends z.infer<typeof polynomialScaleZ> {}\n\n/** NoneScale applies no scaling; the raw value is used directly. */\nexport const noneScaleZ = z.object({\n type: z.literal(\"none\"),\n});\nexport interface NoneScale extends z.infer<typeof noneScaleZ> {}\n\nexport const SCALE_TYPES = [\"linear\", \"map\", \"table\", \"polynomial\", \"none\"] as const;\nexport const scaleTypeZ = z.enum(SCALE_TYPES);\nexport type ScaleType = z.infer<typeof scaleTypeZ>;\n\n/** Scale determines how raw sensor values are transformed to engineering units. */\nexport const scaleZ = z.discriminatedUnion(\"type\", [\n linearScaleZ,\n mapScaleZ,\n tableScaleZ,\n polynomialScaleZ,\n noneScaleZ,\n]);\nexport type Scale = LinearScale | MapScale | TableScale | PolynomialScale | NoneScale;\n\nexport const SCALE_SCHEMAS: {\n [K in ScaleType]: z.ZodType<Extract<Scale, { type: K }>>;\n} = {\n linear: linearScaleZ,\n map: mapScaleZ,\n table: tableScaleZ,\n polynomial: polynomialScaleZ,\n none: noneScaleZ,\n};\n\nexport const digitalReadConfigZ = task.readConfigZ.extend({\n device: device.keyZ.default(\"\"),\n channels: diChannelZ.array().default(() => []),\n});\nexport interface DigitalReadConfig extends z.infer<typeof digitalReadConfigZ> {}\n\nexport const digitalWriteConfigZ = writeConfigZ.extend({\n channels: doChannelZ.array().default(() => []),\n});\nexport interface DigitalWriteConfig extends z.infer<typeof digitalWriteConfigZ> {}\n\n/** CustomScale applies a user-defined scale to the raw measurement. */\nexport const customScaleZ = z.object({\n /** customScale is the scale applied to the raw measurement. */\n customScale: scaleZ.prefault({ type: \"none\" }),\n});\nexport interface CustomScale extends z.infer<typeof customScaleZ> {}\n\n/** AIVoltageChannel reads a voltage. */\nexport const aiVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage\"),\n });\nexport interface AIVoltageChannel extends z.infer<typeof aiVoltageChannelZ> {}\n\n/** AIAccelChannel reads acceleration from an accelerometer. */\nexport const aiAccelChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelSensitivityUnitsZ.default(\"mVoltsPerG\"),\n });\nexport interface AIAccelChannel extends z.infer<typeof aiAccelChannelZ> {}\n\n/** AIBridgeChannel reads a generic bridge-based sensor. */\nexport const aiBridgeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_bridge\"),\n /** units are the electrical output units of the bridge. */\n units: electricalUnitsZ.default(\"mVoltsPerVolt\"),\n });\nexport interface AIBridgeChannel extends z.infer<typeof aiBridgeChannelZ> {}\n\n/** AICurrentChannel reads a current. */\nexport const aiCurrentChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_current\"),\n /** shuntResistorLoc selects where the shunt resistor is located. */\n shuntResistorLoc: shuntResistorLocationZ.default(\"Default\"),\n /** extShuntResistorVal is the external shunt resistor value, in Ohms. */\n extShuntResistorVal: z.number().default(1),\n });\nexport interface AICurrentChannel extends z.infer<typeof aiCurrentChannelZ> {}\n\n/** AIForceBridgeTableChannel reads force from a bridge with a calibration table. */\nexport const aiForceBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_table\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgeTableChannel extends z.infer<\n typeof aiForceBridgeTableChannelZ\n> {}\n\n/**\n * AIForceBridgeTwoPointLinChannel reads force from a bridge with two-point linear\n * calibration.\n */\nexport const aiForceBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_two_point_lin\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgeTwoPointLinChannel extends z.infer<\n typeof aiForceBridgeTwoPointLinChannelZ\n> {}\n\n/** AIForceIEPEChannel reads force from an IEPE sensor. */\nexport const aiForceIEPEChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_iepe\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** sensitivityUnits are the units of the IEPE sensor sensitivity. */\n sensitivityUnits: forceSensitivityUnitsZ.default(\"mVoltsPerNewton\"),\n });\nexport interface AIForceIEPEChannel extends z.infer<typeof aiForceIEPEChannelZ> {}\n\n/** AIMicrophoneChannel reads sound pressure from a microphone. */\nexport const aiMicrophoneChannelZ = baseAIChannelZ\n .extend(terminalZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_microphone\"),\n /** micSensitivity is the microphone sensitivity, in mV/Pa. */\n micSensitivity: z.number().default(0),\n /** maxSndPressLevel is the maximum expected sound pressure level, in dB. */\n maxSndPressLevel: z.number().default(0),\n });\nexport interface AIMicrophoneChannel extends z.infer<typeof aiMicrophoneChannelZ> {}\n\n/**\n * AIPressureBridgeTableChannel reads pressure from a bridge with a calibration table.\n */\nexport const aiPressureBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_table\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgeTableChannel extends z.infer<\n typeof aiPressureBridgeTableChannelZ\n> {}\n\n/**\n * AIPressureBridgeTwoPointLinChannel reads pressure from a bridge with two-point linear\n * calibration.\n */\nexport const aiPressureBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_two_point_lin\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgeTwoPointLinChannel extends z.infer<\n typeof aiPressureBridgeTwoPointLinChannelZ\n> {}\n\n/** AIResistanceChannel reads a resistance. */\nexport const aiResistanceChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_resistance\"),\n });\nexport interface AIResistanceChannel extends z.infer<typeof aiResistanceChannelZ> {}\n\n/** AIRTDChannel reads temperature from an RTD. */\nexport const aiRTDChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_rtd\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** rtdType selects the RTD resistance-temperature curve. */\n rtdType: rtdTypeZ.default(\"Pt3750\"),\n /** r0 is the sensor resistance at 0 degrees Celsius, in Ohms. */\n r0: z.number().default(0),\n });\nexport interface AIRTDChannel extends z.infer<typeof aiRTDChannelZ> {}\n\n/** AIStrainGaugeChannel reads strain from a strain gauge. */\nexport const aiStrainGaugeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_strain_gauge\"),\n /** strainConfig selects the strain-gauge bridge configuration. */\n strainConfig: strainConfigZ.default(\"FullBridgeI\"),\n /** gageFactor is the gauge factor of the strain gauge. */\n gageFactor: z.number().default(0),\n /** initialBridgeVoltage is the bridge output voltage in the unloaded state. */\n initialBridgeVoltage: z.number().default(0),\n /** nominalGageResistance is the nominal gauge resistance, in Ohms. */\n nominalGageResistance: z.number().default(0),\n /** poissonRatio is the Poisson ratio of the measured material. */\n poissonRatio: z.number().default(0),\n /** leadWireResistance is the resistance of the lead wires, in Ohms. */\n leadWireResistance: z.number().default(0),\n });\nexport interface AIStrainGaugeChannel extends z.infer<typeof aiStrainGaugeChannelZ> {}\n\n/** AITempBuiltinChannel reads temperature from the device's built-in sensor. */\nexport const aiTempBuiltinChannelZ = baseAIChannelZ.omit({ port: true }).extend({\n type: z.literal(\"ai_temp_builtin\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n});\nexport interface AITempBuiltinChannel extends z.infer<typeof aiTempBuiltinChannelZ> {}\n\n/** AIThermocoupleChannel reads temperature from a thermocouple. */\nexport const aiThermocoupleChannelZ = baseAIChannelZ.extend(minMaxValZ.shape).extend({\n type: z.literal(\"ai_thermocouple\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** thermocoupleType selects the thermocouple alloy type. */\n thermocoupleType: thermocoupleTypeZ.default(\"J\"),\n /** cjc is the cold-junction compensation applied to the reading. */\n cjc: cjcZ.prefault({ source: \"built_in\" }),\n});\nexport interface AIThermocoupleChannel extends z.infer<typeof aiThermocoupleChannelZ> {}\n\n/** AITorqueBridgeTableChannel reads torque from a bridge with a calibration table. */\nexport const aiTorqueBridgeTableChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(tableZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_table\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the calibration table. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgeTableChannel extends z.infer<\n typeof aiTorqueBridgeTableChannelZ\n> {}\n\n/**\n * AITorqueBridgeTwoPointLinChannel reads torque from a bridge with two-point linear\n * calibration.\n */\nexport const aiTorqueBridgeTwoPointLinChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(twoPointLinZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_two_point_lin\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the two-point calibration. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgeTwoPointLinChannel extends z.infer<\n typeof aiTorqueBridgeTwoPointLinChannelZ\n> {}\n\n/** AIVelocityIEPEChannel reads velocity from an IEPE sensor. */\nexport const aiVelocityIEPEChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(currentExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_velocity_iepe\"),\n /** units are the units of the velocity measurement. */\n units: velocityUnitsZ.default(\"MetersPerSecond\"),\n /** sensitivityUnits are the units of the IEPE sensor sensitivity. */\n sensitivityUnits: velocitySensitivityUnitsZ.default(\n \"MillivoltsPerMillimeterPerSecond\",\n ),\n });\nexport interface AIVelocityIEPEChannel extends z.infer<typeof aiVelocityIEPEChannelZ> {}\n\n/**\n * AIAccel4WireDCVoltageChannel reads acceleration from a 4-wire DC-voltage\n * accelerometer.\n */\nexport const aiAccel4WireDCVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel_4_wire_dc_voltage\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelSensitivityUnitsZ.default(\"mVoltsPerG\"),\n /**\n * scaledByExcitation is true when the excitation voltage is used to scale the\n * reading.\n */\n scaledByExcitation: z.boolean().default(false),\n });\nexport interface AIAccel4WireDCVoltageChannel extends z.infer<\n typeof aiAccel4WireDCVoltageChannelZ\n> {}\n\n/** AIAccelChargeChannel reads acceleration from a charge-mode accelerometer. */\nexport const aiAccelChargeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(sensitivityZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_accel_charge\"),\n /** units are the units of the acceleration measurement. */\n units: accelUnitsZ.default(\"g\"),\n /** sensitivityUnits are the units of the accelerometer sensitivity. */\n sensitivityUnits: accelChargeSensitivityUnitsZ.default(\"PicoCoulombsPerG\"),\n });\nexport interface AIAccelChargeChannel extends z.infer<typeof aiAccelChargeChannelZ> {}\n\n/** AIChargeChannel reads a raw charge. */\nexport const aiChargeChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_charge\"),\n /** units are the units of the charge measurement. */\n units: chargeUnitsZ.default(\"Coulombs\"),\n });\nexport interface AIChargeChannel extends z.infer<typeof aiChargeChannelZ> {}\n\n/** AICurrentRMSChannel reads RMS current. */\nexport const aiCurrentRMSChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_current_rms\"),\n /** shuntResistorLoc selects where the shunt resistor is located. */\n shuntResistorLoc: shuntResistorLocationZ.default(\"Default\"),\n /** extShuntResistorVal is the external shunt resistor value, in Ohms. */\n extShuntResistorVal: z.number().default(1),\n });\nexport interface AICurrentRMSChannel extends z.infer<typeof aiCurrentRMSChannelZ> {}\n\n/**\n * AIForceBridgePolynomialChannel reads force from a bridge with polynomial calibration.\n */\nexport const aiForceBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_force_bridge_polynomial\"),\n /** units are the units of the force measurement. */\n units: forceUnitsZ.default(\"Newtons\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: forceUnitsZ.default(\"Newtons\"),\n });\nexport interface AIForceBridgePolynomialChannel extends z.infer<\n typeof aiForceBridgePolynomialChannelZ\n> {}\n\n/** AIFreqVoltageChannel reads frequency from a voltage signal. */\nexport const aiFreqVoltageChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_freq_voltage\"),\n /** thresholdLevel is the voltage level at which a cycle is counted. */\n thresholdLevel: z.number().default(0),\n /** hysteresis is the hysteresis applied around the threshold level. */\n hysteresis: z.number().default(0),\n });\nexport interface AIFreqVoltageChannel extends z.infer<typeof aiFreqVoltageChannelZ> {}\n\n/**\n * AIPressureBridgePolynomialChannel reads pressure from a bridge with polynomial\n * calibration.\n */\nexport const aiPressureBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_pressure_bridge_polynomial\"),\n /** units are the units of the pressure measurement. */\n units: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: pressureUnitsZ.default(\"PoundsPerSquareInch\"),\n });\nexport interface AIPressureBridgePolynomialChannel extends z.infer<\n typeof aiPressureBridgePolynomialChannelZ\n> {}\n\n/** AIThermistorIexChannel reads temperature from a current-excited thermistor. */\nexport const aiThermistorIexChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(currentExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_thermistor_iex\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** a is the first Steinhart-Hart coefficient. */\n a: z.number().default(0),\n /** b is the second Steinhart-Hart coefficient. */\n b: z.number().default(0),\n /** c is the third Steinhart-Hart coefficient. */\n c: z.number().default(0),\n });\nexport interface AIThermistorIexChannel extends z.infer<\n typeof aiThermistorIexChannelZ\n> {}\n\n/** AIThermistorVexChannel reads temperature from a voltage-excited thermistor. */\nexport const aiThermistorVexChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(resistanceZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend({\n type: z.literal(\"ai_thermistor_vex\"),\n /** units are the units of the temperature measurement. */\n units: temperatureUnitsZ.default(\"DegC\"),\n /** a is the first Steinhart-Hart coefficient. */\n a: z.number().default(0),\n /** b is the second Steinhart-Hart coefficient. */\n b: z.number().default(0),\n /** c is the third Steinhart-Hart coefficient. */\n c: z.number().default(0),\n /** r1 is the reference resistor value, in Ohms. */\n r1: z.number().default(0),\n });\nexport interface AIThermistorVexChannel extends z.infer<\n typeof aiThermistorVexChannelZ\n> {}\n\n/**\n * AITorqueBridgePolynomialChannel reads torque from a bridge with polynomial\n * calibration.\n */\nexport const aiTorqueBridgePolynomialChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(bridgeZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(bridgePolynomialZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_torque_bridge_polynomial\"),\n /** units are the units of the torque measurement. */\n units: torqueUnitsZ.default(\"NewtonMeters\"),\n /** physicalUnits are the physical units of the polynomial calibration. */\n physicalUnits: torqueUnitsZ.default(\"NewtonMeters\"),\n });\nexport interface AITorqueBridgePolynomialChannel extends z.infer<\n typeof aiTorqueBridgePolynomialChannelZ\n> {}\n\n/** AIVoltageRMSChannel reads RMS voltage. */\nexport const aiVoltageRMSChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage_rms\"),\n });\nexport interface AIVoltageRMSChannel extends z.infer<typeof aiVoltageRMSChannelZ> {}\n\n/** AIVoltageWithExcitChannel reads a voltage with excitation. */\nexport const aiVoltageWithExcitChannelZ = baseAIChannelZ\n .extend(minMaxValZ.shape)\n .extend(terminalZ.shape)\n .extend(voltageExcitationZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ai_voltage_with_excit\"),\n /** bridgeConfig selects the physical bridge wiring. */\n bridgeConfig: bridgeConfigZ.default(\"FullBridge\"),\n /**\n * scaledByExcitation is true when the excitation voltage is used to scale the\n * reading.\n */\n scaledByExcitation: z.boolean().default(false),\n });\nexport interface AIVoltageWithExcitChannel extends z.infer<\n typeof aiVoltageWithExcitChannelZ\n> {}\n\nexport const AI_CHANNEL_TYPES = [\n \"ai_voltage\",\n \"ai_accel\",\n \"ai_bridge\",\n \"ai_current\",\n \"ai_force_bridge_table\",\n \"ai_force_bridge_two_point_lin\",\n \"ai_force_iepe\",\n \"ai_microphone\",\n \"ai_pressure_bridge_table\",\n \"ai_pressure_bridge_two_point_lin\",\n \"ai_resistance\",\n \"ai_rtd\",\n \"ai_strain_gauge\",\n \"ai_temp_builtin\",\n \"ai_thermocouple\",\n \"ai_torque_bridge_table\",\n \"ai_torque_bridge_two_point_lin\",\n \"ai_velocity_iepe\",\n \"ai_accel_4_wire_dc_voltage\",\n \"ai_accel_charge\",\n \"ai_charge\",\n \"ai_current_rms\",\n \"ai_force_bridge_polynomial\",\n \"ai_freq_voltage\",\n \"ai_pressure_bridge_polynomial\",\n \"ai_thermistor_iex\",\n \"ai_thermistor_vex\",\n \"ai_torque_bridge_polynomial\",\n \"ai_voltage_rms\",\n \"ai_voltage_with_excit\",\n] as const;\nexport const aiChannelTypeZ = z.enum(AI_CHANNEL_TYPES);\nexport type AIChannelType = z.infer<typeof aiChannelTypeZ>;\n\n/**\n * AIChannel is a single NI analog input channel. The type field selects the measurement\n * mode and the fields that accompany it.\n */\nexport const aiChannelZ = z.discriminatedUnion(\"type\", [\n aiVoltageChannelZ,\n aiAccelChannelZ,\n aiBridgeChannelZ,\n aiCurrentChannelZ,\n aiForceBridgeTableChannelZ,\n aiForceBridgeTwoPointLinChannelZ,\n aiForceIEPEChannelZ,\n aiMicrophoneChannelZ,\n aiPressureBridgeTableChannelZ,\n aiPressureBridgeTwoPointLinChannelZ,\n aiResistanceChannelZ,\n aiRTDChannelZ,\n aiStrainGaugeChannelZ,\n aiTempBuiltinChannelZ,\n aiThermocoupleChannelZ,\n aiTorqueBridgeTableChannelZ,\n aiTorqueBridgeTwoPointLinChannelZ,\n aiVelocityIEPEChannelZ,\n aiAccel4WireDCVoltageChannelZ,\n aiAccelChargeChannelZ,\n aiChargeChannelZ,\n aiCurrentRMSChannelZ,\n aiForceBridgePolynomialChannelZ,\n aiFreqVoltageChannelZ,\n aiPressureBridgePolynomialChannelZ,\n aiThermistorIexChannelZ,\n aiThermistorVexChannelZ,\n aiTorqueBridgePolynomialChannelZ,\n aiVoltageRMSChannelZ,\n aiVoltageWithExcitChannelZ,\n]);\nexport type AIChannel =\n | AIVoltageChannel\n | AIAccelChannel\n | AIBridgeChannel\n | AICurrentChannel\n | AIForceBridgeTableChannel\n | AIForceBridgeTwoPointLinChannel\n | AIForceIEPEChannel\n | AIMicrophoneChannel\n | AIPressureBridgeTableChannel\n | AIPressureBridgeTwoPointLinChannel\n | AIResistanceChannel\n | AIRTDChannel\n | AIStrainGaugeChannel\n | AITempBuiltinChannel\n | AIThermocoupleChannel\n | AITorqueBridgeTableChannel\n | AITorqueBridgeTwoPointLinChannel\n | AIVelocityIEPEChannel\n | AIAccel4WireDCVoltageChannel\n | AIAccelChargeChannel\n | AIChargeChannel\n | AICurrentRMSChannel\n | AIForceBridgePolynomialChannel\n | AIFreqVoltageChannel\n | AIPressureBridgePolynomialChannel\n | AIThermistorIexChannel\n | AIThermistorVexChannel\n | AITorqueBridgePolynomialChannel\n | AIVoltageRMSChannel\n | AIVoltageWithExcitChannel;\n\nexport const AI_CHANNEL_SCHEMAS: {\n [K in AIChannelType]: z.ZodType<Extract<AIChannel, { type: K }>>;\n} = {\n ai_voltage: aiVoltageChannelZ,\n ai_accel: aiAccelChannelZ,\n ai_bridge: aiBridgeChannelZ,\n ai_current: aiCurrentChannelZ,\n ai_force_bridge_table: aiForceBridgeTableChannelZ,\n ai_force_bridge_two_point_lin: aiForceBridgeTwoPointLinChannelZ,\n ai_force_iepe: aiForceIEPEChannelZ,\n ai_microphone: aiMicrophoneChannelZ,\n ai_pressure_bridge_table: aiPressureBridgeTableChannelZ,\n ai_pressure_bridge_two_point_lin: aiPressureBridgeTwoPointLinChannelZ,\n ai_resistance: aiResistanceChannelZ,\n ai_rtd: aiRTDChannelZ,\n ai_strain_gauge: aiStrainGaugeChannelZ,\n ai_temp_builtin: aiTempBuiltinChannelZ,\n ai_thermocouple: aiThermocoupleChannelZ,\n ai_torque_bridge_table: aiTorqueBridgeTableChannelZ,\n ai_torque_bridge_two_point_lin: aiTorqueBridgeTwoPointLinChannelZ,\n ai_velocity_iepe: aiVelocityIEPEChannelZ,\n ai_accel_4_wire_dc_voltage: aiAccel4WireDCVoltageChannelZ,\n ai_accel_charge: aiAccelChargeChannelZ,\n ai_charge: aiChargeChannelZ,\n ai_current_rms: aiCurrentRMSChannelZ,\n ai_force_bridge_polynomial: aiForceBridgePolynomialChannelZ,\n ai_freq_voltage: aiFreqVoltageChannelZ,\n ai_pressure_bridge_polynomial: aiPressureBridgePolynomialChannelZ,\n ai_thermistor_iex: aiThermistorIexChannelZ,\n ai_thermistor_vex: aiThermistorVexChannelZ,\n ai_torque_bridge_polynomial: aiTorqueBridgePolynomialChannelZ,\n ai_voltage_rms: aiVoltageRMSChannelZ,\n ai_voltage_with_excit: aiVoltageWithExcitChannelZ,\n};\n\n/** CIFrequencyChannel measures signal frequency. */\nexport const ciFrequencyChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_frequency\"),\n /** minVal is the minimum expected frequency. */\n minVal: z.number().default(2),\n /** maxVal is the maximum expected frequency. */\n maxVal: z.number().default(100),\n /** units are the units of the frequency measurement. */\n units: ciFreqUnitsZ.default(\"Hz\"),\n /** edge selects the edge the counter responds to. */\n edge: ciEdgeZ.default(\"Rising\"),\n /** measMethod selects the measurement method. */\n measMethod: ciMeasMethodZ.default(\"DynamicAvg\"),\n /** measTime is the averaging window for high-frequency measurement, in seconds. */\n measTime: z.number().default(0.000006),\n /** divisor is the counter divisor for large-range measurement. */\n divisor: z.int32().default(4),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIFrequencyChannel extends z.infer<typeof ciFrequencyChannelZ> {}\n\n/** CIEdgeCountChannel counts signal edges. */\nexport const ciEdgeCountChannelZ = baseCIChannelZ.extend({\n type: z.literal(\"ci_edge_count\"),\n /** activeEdge selects the edge that increments the count. */\n activeEdge: ciEdgeZ.default(\"Rising\"),\n /** countDirection selects the direction the counter counts. */\n countDirection: ciCountDirectionZ.default(\"CountUp\"),\n /** initialCount is the value the counter starts at. */\n initialCount: z.number().default(0),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n});\nexport interface CIEdgeCountChannel extends z.infer<typeof ciEdgeCountChannelZ> {}\n\n/** CIPeriodChannel measures signal period. */\nexport const ciPeriodChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_period\"),\n /** minVal is the minimum expected period, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected period, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the period measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** startingEdge selects the edge that starts a period measurement. */\n startingEdge: ciEdgeZ.default(\"Rising\"),\n /** measMethod selects the measurement method. */\n measMethod: ciMeasMethodZ.default(\"DynamicAvg\"),\n /** measTime is the averaging window for high-frequency measurement, in seconds. */\n measTime: z.number().default(0.001),\n /** divisor is the counter divisor for large-range measurement. */\n divisor: z.int32().default(4),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIPeriodChannel extends z.infer<typeof ciPeriodChannelZ> {}\n\n/** CIPulseWidthChannel measures pulse width. */\nexport const ciPulseWidthChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_pulse_width\"),\n /** minVal is the minimum expected pulse width, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected pulse width, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the pulse-width measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** startingEdge selects the edge that starts a pulse-width measurement. */\n startingEdge: ciEdgeZ.default(\"Rising\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIPulseWidthChannel extends z.infer<typeof ciPulseWidthChannelZ> {}\n\n/** CISemiPeriodChannel measures semi-period. */\nexport const ciSemiPeriodChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_semi_period\"),\n /** minVal is the minimum expected semi-period, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected semi-period, in the selected units. */\n maxVal: z.number().default(0.1),\n /** units are the units of the semi-period measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CISemiPeriodChannel extends z.infer<typeof ciSemiPeriodChannelZ> {}\n\n/** CITwoEdgeSepChannel measures the separation between two edges. */\nexport const ciTwoEdgeSepChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_two_edge_sep\"),\n /** minVal is the minimum expected separation, in the selected units. */\n minVal: z.number().default(0.000001),\n /** maxVal is the maximum expected separation, in the selected units. */\n maxVal: z.number().default(1),\n /** units are the units of the two-edge-separation measurement. */\n units: ciTimeUnitsZ.default(\"Seconds\"),\n /** firstEdge selects the edge that starts the measurement. */\n firstEdge: ciEdgeZ.default(\"Rising\"),\n /** secondEdge selects the edge that stops the measurement. */\n secondEdge: ciEdgeZ.default(\"Falling\"),\n /** firstTerminal is the terminal the first edge's signal is wired to. */\n firstTerminal: z.string().default(\"\"),\n /** secondTerminal is the terminal the second edge's signal is wired to. */\n secondTerminal: z.string().default(\"\"),\n });\nexport interface CITwoEdgeSepChannel extends z.infer<typeof ciTwoEdgeSepChannelZ> {}\n\n/** CIVelocityLinearChannel measures linear velocity from an encoder. */\nexport const ciVelocityLinearChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_velocity_linear\"),\n /** minVal is the minimum expected velocity. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected velocity. */\n maxVal: z.number().default(1),\n /** units are the units of the velocity measurement. */\n units: ciLinearVelocityUnitsZ.default(\"m/s\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** distPerPulse is the linear distance per encoder pulse. */\n distPerPulse: z.number().default(0.001),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIVelocityLinearChannel extends z.infer<\n typeof ciVelocityLinearChannelZ\n> {}\n\n/** CIVelocityAngularChannel measures angular velocity from an encoder. */\nexport const ciVelocityAngularChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_velocity_angular\"),\n /** minVal is the minimum expected velocity. */\n minVal: z.number().default(0),\n /** maxVal is the maximum expected velocity. */\n maxVal: z.number().default(1),\n /** units are the units of the velocity measurement. */\n units: ciAngularVelocityUnitsZ.default(\"RPM\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** pulsesPerRev is the number of encoder pulses per revolution. */\n pulsesPerRev: z.number().default(24),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIVelocityAngularChannel extends z.infer<\n typeof ciVelocityAngularChannelZ\n> {}\n\n/** CIPositionLinearChannel measures linear position from an encoder. */\nexport const ciPositionLinearChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(zIndexZ.shape)\n .extend({\n type: z.literal(\"ci_position_linear\"),\n /** units are the units of the position measurement. */\n units: ciLinearPositionUnitsZ.default(\"Meters\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** distPerPulse is the linear distance per encoder pulse. */\n distPerPulse: z.number().default(0.000001),\n /** initialPos is the position the encoder starts at. */\n initialPos: z.number().default(0),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIPositionLinearChannel extends z.infer<\n typeof ciPositionLinearChannelZ\n> {}\n\n/** CIPositionAngularChannel measures angular position from an encoder. */\nexport const ciPositionAngularChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(zIndexZ.shape)\n .extend({\n type: z.literal(\"ci_position_angular\"),\n /** units are the units of the position measurement. */\n units: ciAngularPositionUnitsZ.default(\"Degrees\"),\n /** decodingType selects the encoder decoding type. */\n decodingType: ciDecodingTypeZ.default(\"X4\"),\n /** pulsesPerRev is the number of encoder pulses per revolution. */\n pulsesPerRev: z.number().default(24),\n /** initialAngle is the angle the encoder starts at. */\n initialAngle: z.number().default(0),\n /** terminalA is the terminal for encoder channel A. */\n terminalA: z.string().default(\"\"),\n /** terminalB is the terminal for encoder channel B. */\n terminalB: z.string().default(\"\"),\n });\nexport interface CIPositionAngularChannel extends z.infer<\n typeof ciPositionAngularChannelZ\n> {}\n\n/** CIDutyCycleChannel measures the duty cycle of a signal. */\nexport const ciDutyCycleChannelZ = baseCIChannelZ\n .extend(customScaleZ.shape)\n .extend(minMaxValZ.shape)\n .extend({\n type: z.literal(\"ci_duty_cycle\"),\n /** minVal is the minimum expected duty-cycle frequency. */\n minVal: z.number().default(2),\n /** maxVal is the maximum expected duty-cycle frequency. */\n maxVal: z.number().default(10000),\n /** activeEdge selects the edge the counter responds to. */\n activeEdge: ciEdgeZ.default(\"Rising\"),\n /** terminal is the terminal the counter signal is wired to. */\n terminal: z.string().default(\"\"),\n });\nexport interface CIDutyCycleChannel extends z.infer<typeof ciDutyCycleChannelZ> {}\n\nexport const CI_CHANNEL_TYPES = [\n \"ci_frequency\",\n \"ci_edge_count\",\n \"ci_period\",\n \"ci_pulse_width\",\n \"ci_semi_period\",\n \"ci_two_edge_sep\",\n \"ci_velocity_linear\",\n \"ci_velocity_angular\",\n \"ci_position_linear\",\n \"ci_position_angular\",\n \"ci_duty_cycle\",\n] as const;\nexport const ciChannelTypeZ = z.enum(CI_CHANNEL_TYPES);\nexport type CIChannelType = z.infer<typeof ciChannelTypeZ>;\n\n/**\n * CIChannel is a single NI counter input channel. The type field selects the\n * measurement mode and the fields that accompany it.\n */\nexport const ciChannelZ = z.discriminatedUnion(\"type\", [\n ciFrequencyChannelZ,\n ciEdgeCountChannelZ,\n ciPeriodChannelZ,\n ciPulseWidthChannelZ,\n ciSemiPeriodChannelZ,\n ciTwoEdgeSepChannelZ,\n ciVelocityLinearChannelZ,\n ciVelocityAngularChannelZ,\n ciPositionLinearChannelZ,\n ciPositionAngularChannelZ,\n ciDutyCycleChannelZ,\n]);\nexport type CIChannel =\n | CIFrequencyChannel\n | CIEdgeCountChannel\n | CIPeriodChannel\n | CIPulseWidthChannel\n | CISemiPeriodChannel\n | CITwoEdgeSepChannel\n | CIVelocityLinearChannel\n | CIVelocityAngularChannel\n | CIPositionLinearChannel\n | CIPositionAngularChannel\n | CIDutyCycleChannel;\n\nexport const CI_CHANNEL_SCHEMAS: {\n [K in CIChannelType]: z.ZodType<Extract<CIChannel, { type: K }>>;\n} = {\n ci_frequency: ciFrequencyChannelZ,\n ci_edge_count: ciEdgeCountChannelZ,\n ci_period: ciPeriodChannelZ,\n ci_pulse_width: ciPulseWidthChannelZ,\n ci_semi_period: ciSemiPeriodChannelZ,\n ci_two_edge_sep: ciTwoEdgeSepChannelZ,\n ci_velocity_linear: ciVelocityLinearChannelZ,\n ci_velocity_angular: ciVelocityAngularChannelZ,\n ci_position_linear: ciPositionLinearChannelZ,\n ci_position_angular: ciPositionAngularChannelZ,\n ci_duty_cycle: ciDutyCycleChannelZ,\n};\n\n/** AOCurrentChannel drives a current output. */\nexport const aoCurrentChannelZ = baseAOChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ao_current\"),\n });\nexport interface AOCurrentChannel extends z.infer<typeof aoCurrentChannelZ> {}\n\n/** AOFuncGenChannel drives a function-generator output. */\nexport const aoFuncGenChannelZ = baseAOChannelZ.extend({\n type: z.literal(\"ao_func_gen\"),\n /** waveType selects the waveform to generate. */\n waveType: waveTypeZ.default(\"Sine\"),\n /** frequency is the waveform frequency, in Hertz. */\n frequency: z.number().default(0),\n /** amplitude is the waveform amplitude. */\n amplitude: z.number().default(0),\n /** offset is the waveform DC offset. */\n offset: z.number().default(0),\n});\nexport interface AOFuncGenChannel extends z.infer<typeof aoFuncGenChannelZ> {}\n\n/** AOVoltageChannel drives a voltage output. */\nexport const aoVoltageChannelZ = baseAOChannelZ\n .extend(minMaxValZ.shape)\n .extend(customScaleZ.shape)\n .extend({\n type: z.literal(\"ao_voltage\"),\n });\nexport interface AOVoltageChannel extends z.infer<typeof aoVoltageChannelZ> {}\n\nexport const AO_CHANNEL_TYPES = [\"ao_current\", \"ao_func_gen\", \"ao_voltage\"] as const;\nexport const aoChannelTypeZ = z.enum(AO_CHANNEL_TYPES);\nexport type AOChannelType = z.infer<typeof aoChannelTypeZ>;\n\n/**\n * AOChannel is a single NI analog output channel. The type field selects the output\n * mode and the fields that accompany it.\n */\nexport const aoChannelZ = z.discriminatedUnion(\"type\", [\n aoCurrentChannelZ,\n aoFuncGenChannelZ,\n aoVoltageChannelZ,\n]);\nexport type AOChannel = AOCurrentChannel | AOFuncGenChannel | AOVoltageChannel;\n\nexport const AO_CHANNEL_SCHEMAS: {\n [K in AOChannelType]: z.ZodType<Extract<AOChannel, { type: K }>>;\n} = {\n ao_current: aoCurrentChannelZ,\n ao_func_gen: aoFuncGenChannelZ,\n ao_voltage: aoVoltageChannelZ,\n};\n\nexport const analogReadConfigZ = task.readConfigZ.extend({\n channels: aiChannelZ.array().default(() => []),\n});\nexport interface AnalogReadConfig extends z.infer<typeof analogReadConfigZ> {}\n\nexport const counterReadConfigZ = task.readConfigZ.extend({\n channels: ciChannelZ.array().default(() => []),\n});\nexport interface CounterReadConfig extends z.infer<typeof counterReadConfigZ> {}\n\nexport const analogWriteConfigZ = writeConfigZ.extend({\n channels: aoChannelZ.array().default(() => []),\n});\nexport interface AnalogWriteConfig extends z.infer<typeof analogWriteConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/ni/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { channel } from \"@/channel\";\nimport { device } from \"@/device\";\nimport { task } from \"@/task\";\n\n/** BaseChannel carries the fields every OPC UA channel shares. */\nexport const baseChannelZ = z.object({\n /** key uniquely identifies the channel within the task. */\n key: z.string().default(id.create),\n /** name is the human-readable channel name. */\n name: z.string().default(\"\"),\n /** disabled is true when the channel is excluded from the task. */\n disabled: z.boolean().default(false),\n /** nodeId is the OPC UA node ID the channel is bound to. */\n nodeId: z.string().default(\"\"),\n /** nodeName is the browse name of the OPC UA node. */\n nodeName: z.string().default(\"\"),\n /** dataType is the data type of the Synnax channel. */\n dataType: z.string().default(\"float32\"),\n});\nexport interface BaseChannel extends z.infer<typeof baseChannelZ> {}\n\nexport const scanConfigZ = task.scanConfigZ;\nexport interface ScanConfig extends z.infer<typeof scanConfigZ> {}\n\nexport const readChannelZ = baseChannelZ.extend({\n channel: channel.keyZ.default(0),\n isIndex: z.boolean().default(false),\n});\nexport interface ReadChannel extends z.infer<typeof readChannelZ> {}\n\nexport const writeChannelZ = baseChannelZ.extend({\n cmdChannel: channel.keyZ.default(0),\n});\nexport interface WriteChannel extends z.infer<typeof writeChannelZ> {}\n\nexport const readConfigZ = task.readConfigZ\n .omit({ sampleRate: true, streamRate: true })\n .extend({\n sampleRate: z.number().default(50),\n streamRate: z.number().default(25),\n device: device.keyZ.default(\"\"),\n arrayMode: z.boolean().default(false),\n arraySize: z.int32().default(1),\n channels: readChannelZ.array().default(() => []),\n });\nexport interface ReadConfig extends z.infer<typeof readConfigZ> {}\n\nexport const writeConfigZ = task.writeConfigZ.extend({\n channels: writeChannelZ.array().default(() => []),\n});\nexport interface WriteConfig extends z.infer<typeof writeConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/opcua/types.gen\";\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\n// Code generated by Oracle. DO NOT EDIT.\n\nimport { id } from \"@synnaxlabs/x\";\nimport { z } from \"zod\";\n\nimport { status } from \"@/status\";\nimport { task } from \"@/task\";\n\n/** Alert maps a Synnax status to a PagerDuty event routing rule. */\nexport const alertZ = z.object({\n /** key uniquely identifies the alert within the task. */\n key: z.string().default(id.create),\n /** status is the key of the Synnax status the alert watches. */\n status: status.keyZ.default(\"\"),\n /** errorsCritical is true when the error variant maps to PagerDuty critical. */\n errorsCritical: z.boolean().default(false),\n /** component is the PagerDuty component attached to triggered events. */\n component: z.string().default(\"\"),\n /** group is the PagerDuty group attached to triggered events. */\n group: z.string().default(\"\"),\n /** class is the PagerDuty class attached to triggered events. */\n class: z.string().default(\"\"),\n /** disabled is true when the alert is excluded from the task. */\n disabled: z.boolean().default(false),\n});\nexport interface Alert extends z.infer<typeof alertZ> {}\n\nexport const taskConfigZ = task.startConfigZ.extend({\n routingKey: z.string().default(\"\"),\n alerts: alertZ.array().default(() => []),\n});\nexport interface TaskConfig extends z.infer<typeof taskConfigZ> {}\n","// Copyright 2026 Synnax Labs, Inc.\n//\n// Use of this software is governed by the Business Source License included in the file\n// licenses/BSL.txt.\n//\n// As of the Change Date specified in that file, in accordance with the Business Source\n// License, use of this software will be governed by the Apache License, Version 2.0,\n// included in the file licenses/APL.txt.\n\nexport * from \"@/pagerduty/types.gen\";\n"],"mappings":";;;;AAmBA,IAAa,IAAc,EAAE,OAAO;CAElC,OAAO,EAAI,OAAO,QAAQ,CAAC;CAE3B,UAAU,EAAI,MAAM,QAAQ,CAAC;CAE7B,WAAW,EAAI,MAAM,QAAQ,EAAE;CAE/B,UAAU,EAAE,OAAO,CAAC,CAAC,QAAQ,QAAQ;AACvC,CAAC,GAIY,IAAmB,EAAE,OAAO;CAEvC,KAAK,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAG,MAAM;CAEjC,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,EAAE;CAE3B,UAAU,EAAE,QAAQ,CAAC,CAAC,QAAQ,EAAK;CAEnC,SAAA,EAAsB,QAAQ,CAAC;CAE/B,QAAA,EAAoB,QAAQ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