@cygnus-reach/reach-protocol
Version:
Improve the Reachâ„ remote support experience with straightforward device interactions via the Reach Protocol.
1,820 lines • 101 kB
TypeScript
import type { BinaryWriteOptions } from "@protobuf-ts/runtime";
import type { IBinaryWriter } from "@protobuf-ts/runtime";
import type { BinaryReadOptions } from "@protobuf-ts/runtime";
import type { IBinaryReader } from "@protobuf-ts/runtime";
import type { PartialMessage } from "@protobuf-ts/runtime";
import { MessageType } from "@protobuf-ts/runtime";
/**
* / This is the "classic" Reach service routing message header.
* / It is now deprecated in favor of the AhsokaMessageHeader.
*
* @generated from protobuf message cr.ReachMessageHeader
*/
export interface ReachMessageHeader {
/**
* @generated from protobuf field: uint32 message_type = 1;
*/
messageType: number;
/**
* @generated from protobuf field: uint32 endpoint_id = 2;
*/
endpointId: number;
/**
* @generated from protobuf field: uint32 client_id = 3;
*/
clientId: number;
/**
* @generated from protobuf field: uint32 remaining_objects = 4;
*/
remainingObjects: number;
/**
* @generated from protobuf field: uint32 transaction_id = 5;
*/
transactionId: number;
}
/**
* / A reach packet includes a header and a payload.
*
* @generated from protobuf message cr.ReachMessage
*/
export interface ReachMessage {
/**
* @generated from protobuf field: cr.ReachMessageHeader header = 1;
*/
header?: ReachMessageHeader;
/**
* @generated from protobuf field: bytes payload = 2;
*/
payload: Uint8Array;
}
/**
* / This Service Routing Message Header is used in the OpenPV system.
* / Reach can speak it.
* / This object represents the Layer 2 Message Format for OpenPV Service Messages.
* / The ordinals are presereved but the names are changed to match
*
* @generated from protobuf message cr.AhsokaMessageHeader
*/
export interface AhsokaMessageHeader {
/**
* / This ID defines the Type of Message being carried in the Envelope / Header
* / Called transport_id in OpenPV terminology.
* / Called message_type in Reach terms.
*
* @generated from protobuf field: int32 message_type = 1;
*/
messageType: number;
/**
* / This ID defines a unique Message / Response used when out of order messages are needed
* / Called transaction_id in the OpenPV system.
* / Called transaction_id in Reach terms.
*
* @generated from protobuf field: int32 transaction_id = 2;
*/
transactionId: number;
/**
* / Unique ID for a Client used in Services that support Multiple Clients
* OpenPV would use a GUID but Reach uses a 4 byte integer
*
* @generated from protobuf field: bytes client_id = 3;
*/
clientId: Uint8Array;
/**
* / Called message_size in the OpenPV system.
* / Called remaining_objects in Reach terms
* / In Reach it defines the number of objects that remain to be
* / transmitted in a continuued transaction.
* / The size of the message payload (in packets) that follows this header
*
* @generated from protobuf field: int32 remaining_objects = 4;
*/
remainingObjects: number;
/**
* Routing for Non-Endpoint Style Transports.
* Note: Endpoint 0 is Reserved for Service Discovery for Non-Endpoint Transports
*
* @generated from protobuf field: uint32 endpoint_id = 5;
*/
endpointId: number;
/**
* / Not used or supported in Reach.
* / In OpenPV, indicates that the message has used deflate compression in addition to pbuff encoding
*
* @generated from protobuf field: bool is_message_compressed = 6;
*/
isMessageCompressed: boolean;
}
/**
* / ERROR_REPORT: Could be sent asynchronously to indicate an error.
*
* @generated from protobuf message cr.ErrorReport
*/
export interface ErrorReport {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: string result_message = 2;
*/
resultMessage: string;
}
/**
* / Request Object used to Echo Data for testing the Device Communication
*
* @generated from protobuf message cr.PingRequest
*/
export interface PingRequest {
/**
* @generated from protobuf field: bytes echo_data = 1;
*/
echoData: Uint8Array;
}
/**
* / Response Object used to Echo Data for testing the Device Communication
*
* @generated from protobuf message cr.PingResponse
*/
export interface PingResponse {
/**
* @generated from protobuf field: bytes echo_data = 1;
*/
echoData: Uint8Array;
/**
* @generated from protobuf field: int32 signal_strength = 2;
*/
signalStrength: number;
}
/**
* / Required Device Information Service
* / Reach sessions are opened with the device info request and response.
*
* @generated from protobuf message cr.DeviceInfoRequest
*/
export interface DeviceInfoRequest {
/**
* @generated from protobuf field: optional string challenge_key = 1;
*/
challengeKey?: string;
/**
* @generated from protobuf field: string client_protocol_version = 2;
*/
clientProtocolVersion: string;
}
/**
* / This message is returned in answer to the first "who are you" query from the client.
*
* @generated from protobuf message cr.DeviceInfoResponse
*/
export interface DeviceInfoResponse {
/**
* @generated from protobuf field: string device_name = 2;
*/
deviceName: string;
/**
* @generated from protobuf field: string manufacturer = 3;
*/
manufacturer: string;
/**
* @generated from protobuf field: string device_description = 4;
*/
deviceDescription: string;
/**
* / Each endpoint advertises a "main" FW version.
* / If there are other FW versions, put them in the parameter repo.
*
* @generated from protobuf field: string firmware_version = 6;
*/
firmwareVersion: string;
/**
* @generated from protobuf field: string protocol_version_string = 7;
*/
protocolVersionString: string;
/**
* @generated from protobuf field: uint32 services = 8;
*/
services: number;
/**
* @generated from protobuf field: uint32 parameter_metadata_hash = 9;
*/
parameterMetadataHash: number;
/**
* @generated from protobuf field: optional bytes application_identifier = 10;
*/
applicationIdentifier?: Uint8Array;
/**
* @generated from protobuf field: uint32 endpoints = 11;
*/
endpoints: number;
/**
* @generated from protobuf field: bytes sizes_struct = 20;
*/
sizesStruct: Uint8Array;
}
/**
* /
* / Parameter Service
* / Parameters provide a simple key:value database. The key is an ID number.
* / The value can be of various common types up to (typically) 32 bytes.
* / Parameters support a robust description which can be const, stored in flash.
* / Parameters can be configured to support notifying the client.
* /
* / The ParameterInfoRequest is used by the client to request detailed information
* / about a set of parameters.
*
* @generated from protobuf message cr.ParameterInfoRequest
*/
export interface ParameterInfoRequest {
/**
* @generated from protobuf field: repeated uint32 parameter_ids = 2;
*/
parameterIds: number[];
}
/**
* / The response to ParameterInfoRequest
*
* @generated from protobuf message cr.ParameterInfoResponse
*/
export interface ParameterInfoResponse {
/**
* @generated from protobuf field: repeated cr.ParameterInfo parameter_infos = 1;
*/
parameterInfos: ParameterInfo[];
}
/**
* / A member of a union (oneof) that describes a uint32
*
* @generated from protobuf message cr.Uint32ParameterInfo
*/
export interface Uint32ParameterInfo {
/**
* @generated from protobuf field: optional uint32 range_min = 1;
*/
rangeMin?: number;
/**
* @generated from protobuf field: optional uint32 range_max = 2;
*/
rangeMax?: number;
/**
* @generated from protobuf field: optional uint32 default_value = 3;
*/
defaultValue?: number;
/**
* @generated from protobuf field: optional string units = 4;
*/
units?: string;
}
/**
* / A member of a union (oneof) that describes an sint32
*
* @generated from protobuf message cr.Int32ParameterInfo
*/
export interface Int32ParameterInfo {
/**
* @generated from protobuf field: optional int32 range_min = 1;
*/
rangeMin?: number;
/**
* @generated from protobuf field: optional int32 range_max = 2;
*/
rangeMax?: number;
/**
* @generated from protobuf field: optional int32 default_value = 3;
*/
defaultValue?: number;
/**
* @generated from protobuf field: optional string units = 4;
*/
units?: string;
}
/**
* / A member of a union (oneof) that describes a float32
*
* @generated from protobuf message cr.Float32ParameterInfo
*/
export interface Float32ParameterInfo {
/**
* @generated from protobuf field: optional float range_min = 1;
*/
rangeMin?: number;
/**
* @generated from protobuf field: optional float range_max = 2;
*/
rangeMax?: number;
/**
* @generated from protobuf field: optional float default_value = 3;
*/
defaultValue?: number;
/**
* @generated from protobuf field: optional uint32 precision = 4;
*/
precision?: number;
/**
* @generated from protobuf field: optional string units = 5;
*/
units?: string;
}
/**
* / A member of a union (oneof) that describes a uint64
*
* @generated from protobuf message cr.Uint64ParameterInfo
*/
export interface Uint64ParameterInfo {
/**
* @generated from protobuf field: optional uint64 range_min = 1;
*/
rangeMin?: bigint;
/**
* @generated from protobuf field: optional uint64 range_max = 2;
*/
rangeMax?: bigint;
/**
* @generated from protobuf field: optional uint64 default_value = 3;
*/
defaultValue?: bigint;
/**
* @generated from protobuf field: optional string units = 4;
*/
units?: string;
}
/**
* / A member of a union (oneof) that describes an sint64
*
* @generated from protobuf message cr.Int64ParameterInfo
*/
export interface Int64ParameterInfo {
/**
* @generated from protobuf field: optional int64 range_min = 1;
*/
rangeMin?: bigint;
/**
* @generated from protobuf field: optional int64 range_max = 2;
*/
rangeMax?: bigint;
/**
* @generated from protobuf field: optional int64 default_value = 3;
*/
defaultValue?: bigint;
/**
* @generated from protobuf field: optional string units = 4;
*/
units?: string;
}
/**
* / A member of a union (oneof) that describes a float64
*
* @generated from protobuf message cr.Float64ParameterInfo
*/
export interface Float64ParameterInfo {
/**
* @generated from protobuf field: optional double range_min = 1;
*/
rangeMin?: number;
/**
* @generated from protobuf field: optional double range_max = 2;
*/
rangeMax?: number;
/**
* @generated from protobuf field: optional double default_value = 3;
*/
defaultValue?: number;
/**
* @generated from protobuf field: optional uint32 precision = 4;
*/
precision?: number;
/**
* @generated from protobuf field: optional string units = 5;
*/
units?: string;
}
/**
* / A member of a union (oneof) that describes a boolean
*
* @generated from protobuf message cr.BoolParameterInfo
*/
export interface BoolParameterInfo {
/**
* @generated from protobuf field: optional bool default_value = 1;
*/
defaultValue?: boolean;
/**
* @generated from protobuf field: optional uint32 pei_id = 2;
*/
peiId?: number;
}
/**
* / A member of a union (oneof) that describes a string
*
* @generated from protobuf message cr.StringParameterInfo
*/
export interface StringParameterInfo {
/**
* @generated from protobuf field: optional string default_value = 1;
*/
defaultValue?: string;
/**
* @generated from protobuf field: uint32 max_size = 2;
*/
maxSize: number;
}
/**
* / A member of a union (oneof) that describes an enumerated value
*
* @generated from protobuf message cr.EnumParameterInfo
*/
export interface EnumParameterInfo {
/**
* @generated from protobuf field: optional uint32 range_min = 1;
*/
rangeMin?: number;
/**
* @generated from protobuf field: optional uint32 range_max = 2;
*/
rangeMax?: number;
/**
* @generated from protobuf field: optional uint32 default_value = 3;
*/
defaultValue?: number;
/**
* @generated from protobuf field: optional uint32 pei_id = 4;
*/
peiId?: number;
/**
* @generated from protobuf field: optional string units = 5;
*/
units?: string;
}
/**
* / A member of a union (oneof) that describes a bitfield
*
* @generated from protobuf message cr.BitfieldParameterInfo
*/
export interface BitfieldParameterInfo {
/**
* @generated from protobuf field: optional uint64 default_value = 1;
*/
defaultValue?: bigint;
/**
* @generated from protobuf field: uint32 bits_available = 2;
*/
bitsAvailable: number;
/**
* @generated from protobuf field: optional uint32 pei_id = 3;
*/
peiId?: number;
}
/**
* / A member of a union (oneof) that describes a byte array
*
* @generated from protobuf message cr.ByteArrayParameterInfo
*/
export interface ByteArrayParameterInfo {
/**
* @generated from protobuf field: optional bytes default_value = 1;
*/
defaultValue?: Uint8Array;
/**
* @generated from protobuf field: uint32 max_size = 2;
*/
maxSize: number;
}
/**
* / A ParameterInfo structure describes a parameter so that it can be easily viewed an edited
* / by humans using a generic parameter editor.
*
* @generated from protobuf message cr.ParameterInfo
*/
export interface ParameterInfo {
/**
* @generated from protobuf field: uint32 id = 1;
*/
id: number;
/**
* @generated from protobuf field: string name = 2;
*/
name: string;
/**
* @generated from protobuf field: optional string description = 3;
*/
description?: string;
/**
* @generated from protobuf field: cr.AccessLevel access = 4;
*/
access: AccessLevel;
/**
* @generated from protobuf field: cr.StorageLocation storage_location = 5;
*/
storageLocation: StorageLocation;
/**
* @generated from protobuf oneof: desc
*/
desc: {
oneofKind: "uint32Desc";
/**
* @generated from protobuf field: cr.Uint32ParameterInfo uint32_desc = 6;
*/
uint32Desc: Uint32ParameterInfo;
} | {
oneofKind: "int32Desc";
/**
* @generated from protobuf field: cr.Int32ParameterInfo int32_desc = 7;
*/
int32Desc: Int32ParameterInfo;
} | {
oneofKind: "float32Desc";
/**
* @generated from protobuf field: cr.Float32ParameterInfo float32_desc = 8;
*/
float32Desc: Float32ParameterInfo;
} | {
oneofKind: "uint64Desc";
/**
* @generated from protobuf field: cr.Uint64ParameterInfo uint64_desc = 9;
*/
uint64Desc: Uint64ParameterInfo;
} | {
oneofKind: "int64Desc";
/**
* @generated from protobuf field: cr.Int64ParameterInfo int64_desc = 10;
*/
int64Desc: Int64ParameterInfo;
} | {
oneofKind: "float64Desc";
/**
* @generated from protobuf field: cr.Float64ParameterInfo float64_desc = 11;
*/
float64Desc: Float64ParameterInfo;
} | {
oneofKind: "boolDesc";
/**
* @generated from protobuf field: cr.BoolParameterInfo bool_desc = 12;
*/
boolDesc: BoolParameterInfo;
} | {
oneofKind: "stringDesc";
/**
* @generated from protobuf field: cr.StringParameterInfo string_desc = 13;
*/
stringDesc: StringParameterInfo;
} | {
oneofKind: "enumDesc";
/**
* @generated from protobuf field: cr.EnumParameterInfo enum_desc = 14;
*/
enumDesc: EnumParameterInfo;
} | {
oneofKind: "bitfieldDesc";
/**
* @generated from protobuf field: cr.BitfieldParameterInfo bitfield_desc = 15;
*/
bitfieldDesc: BitfieldParameterInfo;
} | {
oneofKind: "bytearrayDesc";
/**
* @generated from protobuf field: cr.ByteArrayParameterInfo bytearray_desc = 16;
*/
bytearrayDesc: ByteArrayParameterInfo;
} | {
oneofKind: undefined;
};
}
/**
* / The ParamExKey is used to give names to enums, bitfields, and booleans.
* / It is typically supplied in an array.
* / More than one parameter can point to the same ParamExKey.
*
* @generated from protobuf message cr.ParamExKey
*/
export interface ParamExKey {
/**
* @generated from protobuf field: uint32 id = 1;
*/
id: number;
/**
* @generated from protobuf field: string name = 2;
*/
name: string;
}
/**
* / Describes enum, bitfield, and boolean labels
*
* @generated from protobuf message cr.ParamExInfoResponse
*/
export interface ParamExInfoResponse {
/**
* @generated from protobuf field: cr.ParameterDataType data_type = 2;
*/
dataType: ParameterDataType;
/**
* @generated from protobuf field: repeated cr.ParamExKey keys = 3;
*/
keys: ParamExKey[];
/**
* @generated from protobuf field: uint32 pei_id = 4;
*/
peiId: number;
}
/**
* / A structure used to read one or more parameters
*
* @generated from protobuf message cr.ParameterRead
*/
export interface ParameterRead {
/**
* @generated from protobuf field: repeated uint32 parameter_ids = 2;
*/
parameterIds: number[];
}
/**
* / A structure used to return the values read from one or more parameters
*
* @generated from protobuf message cr.ParameterReadResponse
*/
export interface ParameterReadResponse {
/**
* @generated from protobuf field: repeated cr.ParameterValue values = 3;
*/
values: ParameterValue[];
}
/**
* / A structure used to write one or more Parameters
*
* @generated from protobuf message cr.ParameterWrite
*/
export interface ParameterWrite {
/**
* @generated from protobuf field: repeated cr.ParameterValue values = 3;
*/
values: ParameterValue[];
}
/**
* / The response to a parameter write
*
* @generated from protobuf message cr.ParameterWriteResponse
*/
export interface ParameterWriteResponse {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: optional string result_message = 2;
*/
resultMessage?: string;
}
/**
* / Parameter Notification configuration
* / Notification can be enabled with conditions for each parameter.
*
* @generated from protobuf message cr.ParameterNotifyConfig
*/
export interface ParameterNotifyConfig {
/**
* @generated from protobuf field: uint32 parameter_id = 1;
*/
parameterId: number;
/**
* @generated from protobuf field: uint32 minimum_notification_period = 2;
*/
minimumNotificationPeriod: number;
/**
* @generated from protobuf field: uint32 maximum_notification_period = 3;
*/
maximumNotificationPeriod: number;
/**
* @generated from protobuf field: float minimum_delta = 4;
*/
minimumDelta: number;
}
/**
* / A message used to enable notifications
*
* @generated from protobuf message cr.ParameterEnableNotifications
*/
export interface ParameterEnableNotifications {
/**
* @generated from protobuf field: repeated cr.ParameterNotifyConfig configs = 1;
*/
configs: ParameterNotifyConfig[];
/**
* @generated from protobuf field: bool disable_all_first = 2;
*/
disableAllFirst: boolean;
}
/**
* / A message used to disable notifications
*
* @generated from protobuf message cr.ParameterDisableNotifications
*/
export interface ParameterDisableNotifications {
/**
* @generated from protobuf field: repeated uint32 parameter_ids = 1;
*/
parameterIds: number[];
}
/**
* / The response to enable and disable notifications
*
* @generated from protobuf message cr.ParameterNotifyConfigResponse
*/
export interface ParameterNotifyConfigResponse {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: optional string result_message = 2;
*/
resultMessage?: string;
}
/**
* / The client can discover how notifications are setup.
*
* @generated from protobuf message cr.DiscoverParameterNotifications
*/
export interface DiscoverParameterNotifications {
/**
* @generated from protobuf field: repeated uint32 parameter_ids = 1;
*/
parameterIds: number[];
}
/**
* / Reports which notifications are enabled.
*
* @generated from protobuf message cr.DiscoverParameterNotificationsResponse
*/
export interface DiscoverParameterNotificationsResponse {
/**
* @generated from protobuf field: repeated cr.ParameterNotifyConfig configs = 1;
*/
configs: ParameterNotifyConfig[];
}
/**
* / A message of this type is sent by the server when parameters change.
*
* @generated from protobuf message cr.ParameterNotification
*/
export interface ParameterNotification {
/**
* @generated from protobuf field: repeated cr.ParameterValue values = 2;
*/
values: ParameterValue[];
}
/**
* / A message used to send or receive a single parameter value.
*
* @generated from protobuf message cr.ParameterValue
*/
export interface ParameterValue {
/**
* @generated from protobuf field: uint32 parameter_id = 1;
*/
parameterId: number;
/**
* @generated from protobuf field: uint32 timestamp = 2;
*/
timestamp: number;
/**
* @generated from protobuf oneof: value
*/
value: {
oneofKind: "uint32Value";
/**
* @generated from protobuf field: uint32 uint32_value = 3;
*/
uint32Value: number;
} | {
oneofKind: "int32Value";
/**
* @generated from protobuf field: sint32 int32_value = 4;
*/
int32Value: number;
} | {
oneofKind: "float32Value";
/**
* @generated from protobuf field: float float32_value = 5;
*/
float32Value: number;
} | {
oneofKind: "uint64Value";
/**
* @generated from protobuf field: uint64 uint64_value = 6;
*/
uint64Value: bigint;
} | {
oneofKind: "int64Value";
/**
* @generated from protobuf field: sint64 int64_value = 7;
*/
int64Value: bigint;
} | {
oneofKind: "float64Value";
/**
* @generated from protobuf field: double float64_value = 8;
*/
float64Value: number;
} | {
oneofKind: "boolValue";
/**
* @generated from protobuf field: bool bool_value = 9;
*/
boolValue: boolean;
} | {
oneofKind: "stringValue";
/**
* @generated from protobuf field: string string_value = 10;
*/
stringValue: string;
} | {
oneofKind: "enumValue";
/**
* @generated from protobuf field: uint32 enum_value = 11;
*/
enumValue: number;
} | {
oneofKind: "bitfieldValue";
/**
* @generated from protobuf field: uint64 bitfield_value = 12;
*/
bitfieldValue: bigint;
} | {
oneofKind: "bytesValue";
/**
* @generated from protobuf field: bytes bytes_value = 13;
*/
bytesValue: Uint8Array;
} | {
oneofKind: undefined;
};
}
/**
* / The optional file service provides a method of efficiently transfering large blocks of data.
*
* @generated from protobuf message cr.DiscoverFiles
*/
export interface DiscoverFiles {
}
/**
* / The response to discover files
*
* @generated from protobuf message cr.DiscoverFilesResponse
*/
export interface DiscoverFilesResponse {
/**
* @generated from protobuf field: repeated cr.FileInfo file_infos = 1;
*/
fileInfos: FileInfo[];
}
/**
* / A structure describing a file
*
* @generated from protobuf message cr.FileInfo
*/
export interface FileInfo {
/**
* @generated from protobuf field: uint32 file_id = 1;
*/
fileId: number;
/**
* @generated from protobuf field: string file_name = 2;
*/
fileName: string;
/**
* @generated from protobuf field: cr.AccessLevel access = 3;
*/
access: AccessLevel;
/**
* @generated from protobuf field: int32 current_size_bytes = 4;
*/
currentSizeBytes: number;
/**
* @generated from protobuf field: optional uint32 maximum_size_bytes = 7;
*/
maximumSizeBytes?: number;
/**
* @generated from protobuf field: cr.StorageLocation storage_location = 5;
*/
storageLocation: StorageLocation;
/**
* @generated from protobuf field: bool require_checksum = 6;
*/
requireChecksum: boolean;
}
/**
* / Begins a File Transfer (Upload / Download)
*
* @generated from protobuf message cr.FileTransferRequest
*/
export interface FileTransferRequest {
/**
* @generated from protobuf field: uint32 file_id = 1;
*/
fileId: number;
/**
* @generated from protobuf field: uint32 read_write = 2;
*/
readWrite: number;
/**
* @generated from protobuf field: uint32 request_offset = 3;
*/
requestOffset: number;
/**
* @generated from protobuf field: uint32 transfer_length = 4;
*/
transferLength: number;
/**
* @generated from protobuf field: uint32 transfer_id = 5;
*/
transferId: number;
/**
* @generated from protobuf field: uint32 timeout_in_ms = 7;
*/
timeoutInMs: number;
/**
* @generated from protobuf field: optional uint32 requested_ack_rate = 8;
*/
requestedAckRate?: number;
/**
* @generated from protobuf field: bool require_checksum = 9;
*/
requireChecksum: boolean;
}
/**
* / The response to a file transfer request
*
* @generated from protobuf message cr.FileTransferResponse
*/
export interface FileTransferResponse {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: uint32 transfer_id = 2;
*/
transferId: number;
/**
* @generated from protobuf field: uint32 ack_rate = 3;
*/
ackRate: number;
/**
* @generated from protobuf field: optional string result_message = 4;
*/
resultMessage?: string;
/**
* @generated from protobuf field: uint32 transfer_length = 5;
*/
transferLength: number;
}
/**
* / A bidirectional message describing a packet of file data
*
* @generated from protobuf message cr.FileTransferData
*/
export interface FileTransferData {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: uint32 transfer_id = 2;
*/
transferId: number;
/**
* @generated from protobuf field: uint32 message_number = 3;
*/
messageNumber: number;
/**
* @generated from protobuf field: bytes message_data = 4;
*/
messageData: Uint8Array;
/**
* @generated from protobuf field: optional int32 checksum = 5;
*/
checksum?: number;
}
/**
* / The response to a file transfer
*
* @generated from protobuf message cr.FileTransferDataNotification
*/
export interface FileTransferDataNotification {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: optional string result_message = 2;
*/
resultMessage?: string;
/**
* @generated from protobuf field: bool is_complete = 3;
*/
isComplete: boolean;
/**
* @generated from protobuf field: uint32 transfer_id = 4;
*/
transferId: number;
/**
* @generated from protobuf field: uint32 retry_offset = 5;
*/
retryOffset: number;
}
/**
* / A request to erase (set size to zero) a file.
*
* @generated from protobuf message cr.FileEraseRequest
*/
export interface FileEraseRequest {
/**
* @generated from protobuf field: uint32 file_id = 1;
*/
fileId: number;
}
/**
* / The response to a file erase request
*
* @generated from protobuf message cr.FileEraseResponse
*/
export interface FileEraseResponse {
/**
* @generated from protobuf field: uint32 file_id = 1;
*/
fileId: number;
/**
* @generated from protobuf field: int32 result = 2;
*/
result: number;
/**
* @generated from protobuf field: optional string result_message = 3;
*/
resultMessage?: string;
}
/**
* / A request to list the streams supported by the device
*
* @generated from protobuf message cr.DiscoverStreams
*/
export interface DiscoverStreams {
}
/**
* / The response to DiscoverStreams
*
* @generated from protobuf message cr.DiscoverStreamsResponse
*/
export interface DiscoverStreamsResponse {
/**
* @generated from protobuf field: repeated cr.StreamInfo streams = 1;
*/
streams: StreamInfo[];
}
/**
* / A structure describing a stream
*
* @generated from protobuf message cr.StreamInfo
*/
export interface StreamInfo {
/**
* @generated from protobuf field: uint32 stream_id = 1;
*/
streamId: number;
/**
* @generated from protobuf field: cr.AccessLevel access = 2;
*/
access: AccessLevel;
/**
* @generated from protobuf field: string name = 3;
*/
name: string;
/**
* @generated from protobuf field: string description = 4;
*/
description: string;
}
/**
* / A structure requesting to open a stream
*
* @generated from protobuf message cr.StreamOpen
*/
export interface StreamOpen {
/**
* @generated from protobuf field: uint32 stream_id = 1;
*/
streamId: number;
}
/**
* / The response to StreamOpen and StreamClose requests
*
* @generated from protobuf message cr.StreamResponse
*/
export interface StreamResponse {
/**
* @generated from protobuf field: uint32 stream_id = 1;
*/
streamId: number;
/**
* @generated from protobuf field: int32 result = 2;
*/
result: number;
/**
* @generated from protobuf field: optional string result_message = 3;
*/
resultMessage?: string;
}
/**
* / A structure requesting to close a stream
*
* @generated from protobuf message cr.StreamClose
*/
export interface StreamClose {
/**
* @generated from protobuf field: uint32 stream_id = 1;
*/
streamId: number;
}
/**
* / Bi-Directional message used to asynchronously send stream data to the other side.
*
* @generated from protobuf message cr.StreamData
*/
export interface StreamData {
/**
* @generated from protobuf field: uint32 stream_id = 1;
*/
streamId: number;
/**
* @generated from protobuf field: uint32 roll_count = 2;
*/
rollCount: number;
/**
* @generated from protobuf field: bytes message_data = 3;
*/
messageData: Uint8Array;
/**
* @generated from protobuf field: optional int32 checksum = 4;
*/
checksum?: number;
}
/**
* / The (optional) Command Service allows actions to be triggered from the Reach UI.
*
* @generated from protobuf message cr.DiscoverCommands
*/
export interface DiscoverCommands {
}
/**
* / Response to a DiscoverCommands request.
*
* @generated from protobuf message cr.DiscoverCommandsResponse
*/
export interface DiscoverCommandsResponse {
/**
* @generated from protobuf field: repeated cr.CommandInfo available_commands = 1;
*/
availableCommands: CommandInfo[];
}
/**
* / The description of a command.
*
* @generated from protobuf message cr.CommandInfo
*/
export interface CommandInfo {
/**
* @generated from protobuf field: uint32 id = 1;
*/
id: number;
/**
* @generated from protobuf field: string name = 2;
*/
name: string;
/**
* @generated from protobuf field: optional string description = 3;
*/
description?: string;
/**
* @generated from protobuf field: optional uint32 timeout = 4;
*/
timeout?: number;
}
/**
* / Prompts the device to execute this command.
*
* @generated from protobuf message cr.SendCommand
*/
export interface SendCommand {
/**
* @generated from protobuf field: uint32 command_id = 1;
*/
commandId: number;
}
/**
* / A response acknowledging the completion of a command.
*
* @generated from protobuf message cr.SendCommandResponse
*/
export interface SendCommandResponse {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: optional string result_message = 2;
*/
resultMessage?: string;
}
/**
* / The optional Command Line Interface (CLI) service allows command line messages to be transfered
* / between the client and the server. Messages can travel in both directions. Messages are asynchronous.
* / The client can send a command line and the server can respond.
* / The server can also asynchrously send strings representing the output of the device.
* / The CLIData message is used in both directions.
*
* @generated from protobuf message cr.CLIData
*/
export interface CLIData {
/**
* @generated from protobuf field: string message_data = 1;
*/
messageData: string;
}
/**
* / The optional Time Service is designed to allow the client to
* / set and adjust the real time clock in a server device.
* / The time is best specified as UTC plus timezone offset.
* / Although the timezone is optional, it's best to use it.
* / TimeSetRequest requests setting the server device time to this value.
*
* @generated from protobuf message cr.TimeSetRequest
*/
export interface TimeSetRequest {
/**
* @generated from protobuf field: int64 seconds_utc = 1;
*/
secondsUtc: bigint;
/**
* @generated from protobuf field: optional int32 timezone = 2;
*/
timezone?: number;
}
/**
* / The response to the TimeSetRequest
*
* @generated from protobuf message cr.TimeSetResponse
*/
export interface TimeSetResponse {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: optional string result_message = 2;
*/
resultMessage?: string;
}
/**
* / A request to read the time from the server.
*
* @generated from protobuf message cr.TimeGetRequest
*/
export interface TimeGetRequest {
}
/**
* / The response to a TimeGetRequest
*
* @generated from protobuf message cr.TimeGetResponse
*/
export interface TimeGetResponse {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: optional string result_message = 2;
*/
resultMessage?: string;
/**
* @generated from protobuf field: int64 seconds_utc = 3;
*/
secondsUtc: bigint;
/**
* @generated from protobuf field: optional int32 timezone = 4;
*/
timezone?: number;
}
/**
* / A structure describing a WiFi connection or access point
* / The optional WiFi service is intended to simplify the
* / repetitive task of communicating WiFi credentials to the device.
*
* @generated from protobuf message cr.ConnectionDescription
*/
export interface ConnectionDescription {
/**
* @generated from protobuf field: string ssid = 1;
*/
ssid: string;
/**
* @generated from protobuf field: bool is_connected = 2;
*/
isConnected: boolean;
/**
* @generated from protobuf field: optional int32 signal_strength = 3;
*/
signalStrength?: number;
/**
* @generated from protobuf field: optional cr.WiFiSecurity sec = 4;
*/
sec?: WiFiSecurity;
/**
* @generated from protobuf field: optional cr.WiFiBand band = 5;
*/
band?: WiFiBand;
}
/**
* / A request to provide a list access points
*
* @generated from protobuf message cr.DiscoverWiFi
*/
export interface DiscoverWiFi {
}
/**
* / response to DiscoverWiFi
*
* @generated from protobuf message cr.DiscoverWiFiResponse
*/
export interface DiscoverWiFiResponse {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: repeated cr.ConnectionDescription cd = 2;
*/
cd: ConnectionDescription[];
}
/**
* / A structure describing a WiFi connection request
*
* @generated from protobuf message cr.WiFiConnectionRequest
*/
export interface WiFiConnectionRequest {
/**
* @generated from protobuf field: string ssid = 1;
*/
ssid: string;
/**
* @generated from protobuf field: bool connect = 2;
*/
connect: boolean;
/**
* @generated from protobuf field: bool disconnect = 3;
*/
disconnect: boolean;
/**
* @generated from protobuf field: optional string password = 4;
*/
password?: string;
/**
* @generated from protobuf field: optional bool autoconnect = 5;
*/
autoconnect?: boolean;
}
/**
* / Describes the response to a WiFi connection request
*
* @generated from protobuf message cr.WiFiConnectionResponse
*/
export interface WiFiConnectionResponse {
/**
* @generated from protobuf field: int32 result = 1;
*/
result: number;
/**
* @generated from protobuf field: bool connected = 2;
*/
connected: boolean;
/**
* @generated from protobuf field: optional string result_message = 3;
*/
resultMessage?: string;
/**
* @generated from protobuf field: optional int32 signal_strength = 4;
*/
signalStrength?: number;
}
/**
* / This data describing the sizes of the structures used in C code is
* / communicated in a packed format in the device info structure.
* / Here it's defined in an unpacked (all 32 bit) format. Use the offsets
* / defined below (SizesOffsets) to unpack into this structure.
* / The file "reach_ble_proto_sizes.h" and the function
* / populate_device_info_sizes() are good places to look for further info.
*
* @generated from protobuf message cr.BufferSizes
*/
export interface BufferSizes {
/**
* / The largest message that can be communicated (16 bits)
*
* @generated from protobuf field: uint32 max_message_size = 1;
*/
maxMessageSize: number;
/**
* / The size of the buffer used for the longest strings. (16 bits)
* / Examples include the command line and the error string.
*
* @generated from protobuf field: uint32 big_data_buffer_size = 2;
*/
bigDataBufferSize: number;
/**
* / The number of parameter buffers kept by the device.
* / This determines the number of parameters that can be
* / handled in a single message. (8 bits)
*
* @generated from protobuf field: uint32 parameter_buffer_count = 3;
*/
parameterBufferCount: number;
/**
* / The number of parameter values that fit in one message. (8 bits)
*
* @generated from protobuf field: uint32 num_params_in_response = 4;
*/
numParamsInResponse: number;
/**
* / The length of the description fields in various structures
* / Previously known as long_string_len. (8 bits)
*
* @generated from protobuf field: uint32 description_len = 6;
*/
descriptionLen: number;
/**
* / The number of bytes in the largest parameter data. (8 bits)
*
* @generated from protobuf field: uint32 max_param_bytes = 7;
*/
maxParamBytes: number;
/**
* / The number of bytes in the param info description string (8 bits)
*
* @generated from protobuf field: uint32 param_info_description_len = 10;
*/
paramInfoDescriptionLen: number;
/**
* / The length of most (medium) strings. (8 bits)
* / Used for device name, file names, command names.
*
* @generated from protobuf field: uint32 medium_string_len = 8;
*/
mediumStringLen: number;
/**
* / The number of bytes in short strings like the units label. (8 bits)
* / Also the names of enumerations and the version string.
*
* @generated from protobuf field: uint32 short_string_len = 9;
*/
shortStringLen: number;
/**
* / number of descriptors (stream, file) that fit in one message. (8 bits)
*
* @generated from protobuf field: uint32 num_descriptors_in_response = 5;
*/
numDescriptorsInResponse: number;
/**
* / Number of parameter notifications supported (8 bits)
*
* @generated from protobuf field: uint32 num_param_notifications = 11;
*/
numParamNotifications: number;
/**
* / not currently used (8 bits)
*
* @generated from protobuf field: uint32 num_commands_in_response = 13;
*/
numCommandsInResponse: number;
/**
* / number of param descriptions that can be in one info packet. (8 bits)
*
* @generated from protobuf field: uint32 count_param_desc_in_response = 14;
*/
countParamDescInResponse: number;
/**
* / The max number of parameter notification configurations
* / that a client will provide.
*
* @generated from protobuf field: uint32 param_notify_config_count = 15;
*/
paramNotifyConfigCount: number;
}
/**
* / The major version generally changes to signal a break in compatibility
*
* @generated from protobuf enum cr.ReachProto_MAJOR_Version
*/
export declare enum ReachProto_MAJOR_Version {
/**
* MAJOR_V0 = 0; // Must have a zero
*
* @generated from protobuf enum value: MAJOR_VERSION = 0;
*/
MAJOR_VERSION = 0
}
/**
* / The minor version changes at a release which is not completely compatible
*
* @generated from protobuf enum cr.ReachProto_MINOR_Version
*/
export declare enum ReachProto_MINOR_Version {
/**
* /< Must have a zero
*
* @generated from protobuf enum value: MINOR_V0 = 0;
*/
MINOR_V0 = 0,
/**
* /< Update at a release or a big change
*
* @generated from protobuf enum value: MINOR_VERSION = 2;
*/
MINOR_VERSION = 2
}
/**
* / The patch version changes every time a hex file goes out the door.
*
* @generated from protobuf enum cr.ReachProto_PATCH_Version
*/
export declare enum ReachProto_PATCH_Version {
/**
* /< Must have a zero
*
* @generated from protobuf enum value: PATCH_V0 = 0;
*/
PATCH_V0 = 0,
/**
* /< Update when something changes
*
* @generated from protobuf enum value: PATCH_VERSION = 3;
*/
PATCH_VERSION = 3
}
/**
* / These values identify the type of the Reach message.
*
* @generated from protobuf enum cr.ReachMessageTypes
*/
export declare enum ReachMessageTypes {
/**
* /< No Valid Message
*
* @generated from protobuf enum value: INVALID = 0;
*/
INVALID = 0,
/**
* /< Inform client of an error condition
*
* @generated from protobuf enum value: ERROR_REPORT = 1;
*/
ERROR_REPORT = 1,
/**
* /< Test the link to the server
*
* @generated from protobuf enum value: PING = 2;
*/
PING = 2,
/**
* /< Open the communication with a server
*
* @generated from protobuf enum value: GET_DEVICE_INFO = 3;
*/
GET_DEVICE_INFO = 3,
/**
* / Parameters
*
* /< Get a list of all of the parameters in the repository
*
* @generated from protobuf enum value: DISCOVER_PARAMETERS = 5;
*/
DISCOVER_PARAMETERS = 5,
/**
* /< An extension to discover used by verbose parameters
*
* @generated from protobuf enum value: DISCOVER_PARAM_EX = 6;
*/
DISCOVER_PARAM_EX = 6,
/**
* /< Get the values of a set of parameters
*
* @generated from protobuf enum value: READ_PARAMETERS = 7;
*/
READ_PARAMETERS = 7,
/**
* /< Change the values of a set of parameters
*
* @generated from protobuf enum value: WRITE_PARAMETERS = 8;
*/
WRITE_PARAMETERS = 8,
/**
* /< Sent from the server to the client when a parameter has changed
*
* @generated from protobuf enum value: PARAMETER_NOTIFICATION = 10;
*/
PARAMETER_NOTIFICATION = 10,
/**
* /< Find out how notifications are setup
*
* @generated from protobuf enum value: DISCOVER_NOTIFICATIONS = 11;
*/
DISCOVER_NOTIFICATIONS = 11,
/**
* /< setup parameter notifications
*
* @generated from protobuf enum value: PARAM_ENABLE_NOTIFY = 50;
*/
PARAM_ENABLE_NOTIFY = 50,
/**
* /< disable parameter notifications
*
* @generated from protobuf enum value: PARAM_DISABLE_NOTIFY = 51;
*/
PARAM_DISABLE_NOTIFY = 51,
/**
* / File Transfers
*
* /< Get a list of supported files
*
* @generated from protobuf enum value: DISCOVER_FILES = 12;
*/
DISCOVER_FILES = 12,
/**
* /< Begin a file transfer
*
* @generated from protobuf enum value: TRANSFER_INIT = 13;
*/
TRANSFER_INIT = 13,
/**
* /< (bi-directional) sends the requested data
*
* @generated from protobuf enum value: TRANSFER_DATA = 14;
*/
TRANSFER_DATA = 14,
/**
* /< (bi-directional) Clears Sender to Send More Data
*
* @generated from protobuf enum value: TRANSFER_DATA_NOTIFICATION = 15;
*/
TRANSFER_DATA_NOTIFICATION = 15,
/**
* /< Set file size to zero.
*
* @generated from protobuf enum value: ERASE_FILE = 16;
*/
ERASE_FILE = 16,
/**
* / Commands
*
* /< Get a list of supported commands
*
* @generated from protobuf enum value: DISCOVER_COMMANDS = 17;
*/
DISCOVER_COMMANDS = 17,
/**
* /< Reqeuest excecution of a command
*
* @generated from protobuf enum value: SEND_COMMAND = 18;
*/
SEND_COMMAND = 18,
/**
* Command Line Interface
*
* /< Inform the other side (bi-directional) of a command line.
*
* @generated from protobuf enum value: CLI_NOTIFICATION = 20;
*/
CLI_NOTIFICATION = 20,
/**
* Streams
*
* /< Get a list of supported streams
*
* @generated from protobuf enum value: DISCOVER_STREAMS = 25;
*/
DISCOVER_STREAMS = 25,
/**
* /< Open a stream
*
* @generated from protobuf enum value: OPEN_STREAM = 26;
*/
OPEN_STREAM = 26,
/**
* /< Close a stream
*
* @generated from protobuf enum value: CLOSE_STREAM = 27;
*/
CLOSE_STREAM = 27,
/**
* /< Inform the other side (bi-directional) of data on a stream.
*
* @generated from protobuf enum value: STREAM_DATA_NOTIFICATION = 28;
*/
STREAM_DATA_NOTIFICATION = 28,
/**
* Time
*
* /< Set the real time clock
*
* @generated from protobuf enum value: SET_TIME = 30;
*/
SET_TIME = 30,
/**
* /< Read the real time clock
*
* @generated from protobuf enum value: GET_TIME = 31;
*/
GET_TIME = 31,
/**
* WiFi
*
* /< Get a list of WiFi acces points
*
* @generated from protobuf enum value: DISCOVER_WIFI = 40;
*/
DISCOVER_WIFI = 40,
/**
* /< Connect or disconnect to an access point
*
* @generated from protobuf enum value: WIFI_CONNECT = 41;
*/
WIFI_CONNECT = 41
}
/**
* / binary bit masks or'ed together into the DeviceInfoResponse.services
*
* @generated from protobuf enum cr.ServiceIds
*/
export declare enum ServiceIds {
/**
* /< No services. Device info service is required.
*
* @generated from protobuf enum value: NO_SVC_ID = 0;
*/
NO_SVC_ID = 0,
/**
* /< Set this bit when the device supports the parameter service
*
* @generated from protobuf enum value: PARAMETER_REPO = 1;
*/
PARAMETER_REPO = 1,
/**
* /< Set this bit when the device supports the file service
*
* @generated from protobuf enum value: FILES = 2;
*/
FILES = 2,
/**
* /< Set this bit when the device supports the stream service
*
* @generated from protobuf enum value: STREAMS = 4;
*/
STREAMS = 4,
/**
* /< Set this bit when the device supports the command service
*
* @generated from protobuf enum value: COMMANDS = 8;
*/
COMMANDS = 8,
/**
* /< Set this bit when the device supports the command line interface
*
* @generated from protobuf enum value: CLI = 16;
*/
CLI = 16,
/**
* /< Set this bit when the device supports the time service
*
* @generated from protobuf enum value: TIME = 32;
*/
TIME = 32,
/**
* /< Set this bit when the device supports the WiFi service
*
* @generated from protobuf enum value: WIFI = 64;
*/
WIFI = 64
}
/**
* / binary bit masks or'ed together into the DeviceInfoResponse.endpoints
*
* @generated from protobuf enum cr.EndpointIds
*/
export declare enum EndpointIds {
/**
* /< No other endpoints
*
* @generated from protobuf enum value: NO_ENDPOINTS = 0;
*/
NO_ENDPOINTS = 0,
/**
* /< This is the first of multiple endpoints.
*
* @generated from protobuf enum value: ONE = 1;
*/
ONE =