Struct ax25::frame::Ax25Frame
[−]
[src]
pub struct Ax25Frame { pub source: Address, pub destination: Address, pub route: Vec<RouteEntry>, pub command_or_response: Option<CommandResponse>, pub content: FrameContent, }
A strongly-typed representation of a single AX.25 frame.
Fields
source: Address
destination: Address
route: Vec<RouteEntry>
The route the frame has taken/will take according to repeater entries in the address field
command_or_response: Option<CommandResponse>
AX.25 2.0-compliant stations will indicate in every frame whether it is a command or a response, as part of the address field.
content: FrameContent
Methods
impl Ax25Frame
[src]
fn info_string_lossy(&self) -> Option<String>
Returns a UTF-8 string that is a "best effort" at displaying the information
content of this frame. Returns None if there is no information field present.
Most applications will need to work with the Vec
fn from_bytes(bytes: &[u8]) -> Result<Ax25Frame, Box<Error>>
Parse raw bytes into an Ax25Frame if possible.
fn to_bytes(&self) -> Vec<u8>
Encode an Ax25Frame struct as raw bytes for transmission