jsax25
    Preparing search index...

    Class TESTFrame

    Test Frame

    Hierarchy

    • OutgoingAbstract
      • TESTFrame
    Index

    Constructors

    Properties

    destinationReservedBitOne: boolean

    Reserved bit that may be used in an agreed-upon manner in individual networks.

    destinationReservedBitTwo: boolean

    Reserved bit that may be used in an agreed-upon manner in individual networks.

    sourceReservedBitOne: boolean

    Reserved bit that may be used in an agreed-upon manner in individual networks.

    sourceReservedBitTwo: boolean

    Reserved bit that may be used in an agreed-upon manner in individual networks.

    subtype: FrameSubtype

    The specific type of frame being represented (UI, I, SABM, etc.)

    the string name of the frame type.

    type: "information" | "supervisory" | "unnumbered"

    Whether the frame is an unnumbered, supervisory, or information frame.

    Accessors

    • get destinationCallsign(): string

      The destination station's amateur radio callsign. Valid callsigns are 1 to 6 characters (inclusive), all uppercase.

      Returns string

      InvalidCallsignError on frames where this is mutable and an attempt was made to set an invalid callsign.

    • set destinationCallsign(callsign: string): void

      The destination station's amateur radio callsign. Valid callsigns are 1 to 6 characters (inclusive), all uppercase.

      Parameters

      • callsign: string

      Returns void

      InvalidCallsignError on frames where this is mutable and an attempt was made to set an invalid callsign.

    • get destinationSsid(): number

      The destination station's SSID. Valid SSIDs are integers 0 to 15 (inclusive).

      Returns number

      InvalidSsidError on frames where this is mutable and an attempt was made to set an invalid SSID.

    • set destinationSsid(ssid: number): void

      The destination station's SSID. Valid SSIDs are integers 0 to 15 (inclusive).

      Parameters

      • ssid: number

      Returns void

      InvalidSsidError on frames where this is mutable and an attempt was made to set an invalid SSID.

    • get modulo(): 8 | 128

      Determines the number of outstanding information frames allowed per layer 2 connection at one time.

      Only change this to 128 on supervisory and information frames when you are sure that you are using modulo 128, as setting it incorrectly will cause frames not to decode.

      Returns 8 | 128

      8
      
    • set modulo(modulo: 8 | 128): void

      Determines the number of outstanding information frames allowed per layer 2 connection at one time.

      Only change this to 128 on supervisory and information frames when you are sure that you are using modulo 128, as setting it incorrectly will cause frames not to decode.

      Parameters

      • modulo: 8 | 128

      Returns void

      8
      
    • get payload(): any

      The data or "body" being carried by the frame.

      Non-objects are stringified then encoded using TextEncoder. Objects are first run though JSON.stringify(), then encoded using TextEncoder. Exceptions are Uint8Array and Uint8ClampedArray objects, which are pushed directly to the payload without transformation. Use this format to transmit raw binary data.

      Returns any

      TypeError if attempting to set a symbol or a Promise as a payload. Symbols are not serializable and promises should be resolved to a value before setting them as the payload.

    • set payload(payload: any): void

      The data or "body" being carried by the frame.

      Non-objects are stringified then encoded using TextEncoder. Objects are first run though JSON.stringify(), then encoded using TextEncoder. Exceptions are Uint8Array and Uint8ClampedArray objects, which are pushed directly to the payload without transformation. Use this format to transmit raw binary data.

      Parameters

      • payload: any

      Returns void

      TypeError if attempting to set a symbol or a Promise as a payload. Symbols are not serializable and promises should be resolved to a value before setting them as the payload.

    • get pid(): number | undefined

      A number indicating which layer 3 protocol is in use according to the AX25 spec. Found on information (I) and unnumbered information (UI) frames. Otherwise undefined.

      Valid values are integers 0 to 255 inclusive.

      Returns number | undefined

      a number corresponding to the layer 3 protocol in use. See AX.25 documentation for a key/value table.

      InvalidPidError on frames where this is mutable and an attempt was made to set the number to a non-integer or an integer that is less than 0 or greater than 255.

    • set pid(pid: number | undefined): void

      A number indicating which layer 3 protocol is in use according to the AX25 spec. Found on information (I) and unnumbered information (UI) frames. Otherwise undefined.

      Valid values are integers 0 to 255 inclusive.

      Parameters

      • pid: number | undefined

      Returns void

      a number corresponding to the layer 3 protocol in use. See AX.25 documentation for a key/value table.

      InvalidPidError on frames where this is mutable and an attempt was made to set the number to a non-integer or an integer that is less than 0 or greater than 255.

    • get pollOrFinal(): boolean

      Used in all types of frames. The P/F bit is also used in a command (poll) mode to request an immediate reply to a frame. The reply to this poll is indicated by setting the response (final) bit in the appropriate frame.

      Returns boolean

    • set pollOrFinal(pollOrFinal: boolean): void

      Used in all types of frames. The P/F bit is also used in a command (poll) mode to request an immediate reply to a frame. The reply to this poll is indicated by setting the response (final) bit in the appropriate frame.

      Parameters

      • pollOrFinal: boolean

      Returns void

    • get receivedSequence(): number | undefined

      Exists on information and supervisory frames. Otherwise undefined. Prior to sending an information or supervisory frame, this variable is updated to equal that of the received state variable, thus implicitly acknowledging the proper reception of all frames up to and including receivedSequence - 1.

      Valid values are integers 0 to 7 inclusive when using modulo 8, or integers 0 to 127 inclusive when using modulo 127.

      Returns number | undefined

      RangeError on frames where this is mutable and an attempt was made to set the number to a non-integer, a negative integer, an integer greater than 7 when set to modulo 8, or an integer greater than 127 when set to modulo 128.

    • set receivedSequence(receivedSequence: number | undefined): void

      Exists on information and supervisory frames. Otherwise undefined. Prior to sending an information or supervisory frame, this variable is updated to equal that of the received state variable, thus implicitly acknowledging the proper reception of all frames up to and including receivedSequence - 1.

      Valid values are integers 0 to 7 inclusive when using modulo 8, or integers 0 to 127 inclusive when using modulo 127.

      Parameters

      • receivedSequence: number | undefined

      Returns void

      RangeError on frames where this is mutable and an attempt was made to set the number to a non-integer, a negative integer, an integer greater than 7 when set to modulo 8, or an integer greater than 127 when set to modulo 128.

    • get repeaters(): Repeater[]

      The repeaters/digipeaters that the frame is addressed to travel through.

      Returns Repeater[]

      an array of Repeater objects

      InvalidCallsignError and/or InvalidSsidError on frames where this is mutable and an attempt was made to set a repeater with an invalid callsign or SSID.

    • set repeaters(repeaters: Repeater[]): void

      The repeaters/digipeaters that the frame is addressed to travel through.

      Parameters

      Returns void

      an array of Repeater objects

      InvalidCallsignError and/or InvalidSsidError on frames where this is mutable and an attempt was made to set a repeater with an invalid callsign or SSID.

    • get sendSequence(): number | undefined

      Found in the control field of all information frames. Otherwise undefined. It contains the sequence number of the information frame being sent. Just prior to the transmission of the information frame, it is updated to equal the send state variable.

      Valid values are integers 0 to 7 inclusive when using modulo 8, or integers 0 to 127 inclusive when using modulo 127.

      Returns number | undefined

      RangeError on frames where this is mutable and an attempt was made to set the number to a non-integer, a negative integer, an integer greater than 7 when set to modulo 8, or an integer greater than 127 when set to modulo 128.

    • set sendSequence(sendSequence: number | undefined): void

      Found in the control field of all information frames. Otherwise undefined. It contains the sequence number of the information frame being sent. Just prior to the transmission of the information frame, it is updated to equal the send state variable.

      Valid values are integers 0 to 7 inclusive when using modulo 8, or integers 0 to 127 inclusive when using modulo 127.

      Parameters

      • sendSequence: number | undefined

      Returns void

      RangeError on frames where this is mutable and an attempt was made to set the number to a non-integer, a negative integer, an integer greater than 7 when set to modulo 8, or an integer greater than 127 when set to modulo 128.

    • get sourceCallsign(): string

      The sending station's amateur radio callsign. Valid callsigns are 1 to 6 characters (inclusive), all uppercase.

      Returns string

      InvalidCallsignError on frames where this is mutable and an attempt was made to set an invalid callsign.

    • set sourceCallsign(callsign: string): void

      The sending station's amateur radio callsign. Valid callsigns are 1 to 6 characters (inclusive), all uppercase.

      Parameters

      • callsign: string

      Returns void

      InvalidCallsignError on frames where this is mutable and an attempt was made to set an invalid callsign.

    • get sourceSsid(): number

      The sending station's SSID. Valid SSIDs are integers 0 to 15 (inclusive).

      Returns number

      InvalidSsidError on frames where this is mutable and an attempt was made to set an invalid SSID.

    • set sourceSsid(ssid: number): void

      The sending station's SSID. Valid SSIDs are integers 0 to 15 (inclusive).

      Parameters

      • ssid: number

      Returns void

      InvalidSsidError on frames where this is mutable and an attempt was made to set an invalid SSID.

    Methods

    • Get the frame encoded for use with a KISS connection. This can be written to a Socket, SerialPort, etc.

      Returns Uint8Array

      a Uint8Array suitable for passing to Duplex.write().

    • Returns a JSON representation of the frame.

      Returns {
          commandOrResponse: "command" | "response" | "legacy";
          destinationCallsign: string;
          destinationCommandBit: boolean;
          destinationReservedBitOne: boolean;
          destinationReservedBitTwo: boolean;
          destinationSsid: number;
          isCommand: boolean;
          isLegacy: boolean;
          isResponse: boolean;
          modulo: 8 | 128;
          payload: any;
          pid: number | undefined;
          pollOrFinal: boolean;
          receivedSequence: number | undefined;
          repeaters: Repeater[];
          sendSequence: number | undefined;
          sourceCallsign: string;
          sourceCommandBit: boolean;
          sourceReservedBitOne: boolean;
          sourceReservedBitTwo: boolean;
          sourceSsid: number;
          subtype: FrameSubtype;
          type: "information" | "supervisory" | "unnumbered";
      }

    • Returns a string representation of the frame.

      Returns string

    • Parameters

      • callsign: string
      • commandOrHasBeenRepeated: boolean
      • reservedBitOne: boolean
      • reservedBitTwo: boolean
      • ssid: number
      • finalAddress: boolean

      Returns number[]

    • Parameters

      • modulo: 8 | 128
      • bitsOne: string | number
      • pollFinal: boolean
      • bitsTwo: string | number

      Returns number | number[]