BSB Developer Docs
Loading...
Searching...
No Matches
KermitIo Struct Reference

I/O interface used by the Kermit sender to read the source file and transmit data over the communication channel. More...

#include <fkermit.h>

Data Fields

int32_t(* src_file_read )(void *context, uint8_t *buffer, size_t length)
 Read up to length bytes of source data into buffer.
 
int32_t(* comms_send )(void *context, const uint8_t *buffer, size_t length)
 Send length bytes over the communication channel.
 

Detailed Description

I/O interface used by the Kermit sender to read the source file and transmit data over the communication channel.

Every callback receives the user-provided context unchanged. The pointed-to KermitIo instance must outlive any session created from it.

Field Documentation

◆ comms_send

int32_t(* KermitIo::comms_send) (void *context, const uint8_t *buffer, size_t length)

Send length bytes over the communication channel.

Parameters
[in]contextUser-provided context.
[in]bufferData to send.
[in]lengthNumber of bytes to send.
Returns
Number of bytes actually sent.

◆ src_file_read

int32_t(* KermitIo::src_file_read) (void *context, uint8_t *buffer, size_t length)

Read up to length bytes of source data into buffer.

Parameters
[in]contextUser-provided context.
[out]bufferDestination buffer.
[in]lengthNumber of bytes to read.
Returns
Number of bytes read; 0 indicates end of file.

The documentation for this struct was generated from the following file: