Create a new IncomingFrame object from an incoming ArrayLike<number> or Iterable<number> from a KISS source such as a TCP port, serial port, etc.
An ArrayLike<number> or Iterable<number> representing a raw KISS frame.
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. Defaults to 8.
Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_Protected_ReadonlyencodedThe raw number array backing the AX25 frame's data.
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.
Whether the frame is a command frame or a response frame if it is using the latest version of the AX.25 protocol. If not, then it is using the legacy protocol.
string 'command', 'response', or 'legacy'
Determines in conjunction with the sourceCommandBit if the frame is a command, response, or legacy type frame.
Reserved bit that may be used in an agreed-upon manner in individual networks.
Reserved bit that may be used in an agreed-upon manner in individual networks.
Whether the frame is a command frame.
Whether the frame is a legacy frame.
Whether the frame is a response frame.
The data or "body" being carried by the frame.
Only exists on unnumbered information (UI), information (I), Test (TEST), and exchange identification (XID) frames.
a Buffer representing the payload data on frames that have a payload, or undefined on frames that don't have a payload.
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.
a number corresponding to the layer 3 protocol in use. See AX.25 documentation for a key/value table.
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.
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.
ProtectedresponseFound 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.
Determines in conjunction with the destinationCommandBit if the frame is a command, response, or legacy type frame.
Reserved bit that may be used in an agreed-upon manner in individual networks.
Reserved bit that may be used in an agreed-upon manner in individual networks.
The specific type of frame being represented (UI, I, SABM, etc.)
the string name of the frame type.
Whether the frame is an unnumbered, supervisory, or information frame.
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
OptionalpollOrFinal: booleanOptionalcommandOrResponse: "command" | "response"import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
OptionalpollFinal: booleanOptionalcommandOrResponse: "command" | "response"import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
OptionalpollFinal: booleanOptionalcommandOrResponse: "command" | "response"import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
OptionalcommandOrResponse: "command" | "response"import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
Optionalpid: numberOptionalpollOrFinal: booleanOptionalcommandOrResponse: "command" | "response"import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
OptionalcommandOrResponse: "command" | "response"OptionalpollOrFinal: booleanimport { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
Optionalpayload: anyOptionalcommandOrResponse: "command" | "response"import { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
Get a pre-addressed OutgoingFrame to reply with. A convenience method that returns a frame type of your choice, with the destination and source information reversed from the source frame.
OptionalpollOrFinal: booleanOptionalpid: numberimport { createConnection, Socket } from "net";
import { IncomingFrame, UIFrame } from "jsax25";
const MY_CALL: string = 'N0CALL'
const MY_SSID: number = 10
const kissConnection: Socket = createConnection({
host: 'localhost',
port: 8001
})
kissConnection.on('data', (chunk) => {
const incoming = new IncomingFrame(chunk)
if (incoming.destinationCallsign === MY_CALL && incoming.destinationSsid === MY_SSID) {
// response's destinationCallsign and destinationSsid are set to incoming's sourceCallsign and sourceSsid
// response's sourceCallsign and sourceSsid are set to incoming's destinationCallsign and destinationSsid
const response: UIFrame = incoming.replyWith('UI', `Thank you ${incoming.sourceCallsign}-${incoming.sourceSsid}! I've received your message!`)
kissConnection.write(new Uint8Array(response.encode()))
}
})
ProtectedsReturns a JSON representation of the frame.
Returns a string representation of the frame.
A class abstraction around an incoming binary AX25 frame allowing data to be retrieved using getters.