PadicoTM

Documentation

« back to PM2 home.
padico_psp_driver_s Struct Reference

driver descriptor for the PSP interface. More...

#include <PSP.h>

Data Fields

void(* init )(void *_instance, uint32_t tag, const char *label, size_t *h_size, padico_psp_handler_t handler, void *key)
 init a new PSP instance
 
void(* listen )(void *_instance, padico_topo_node_t node)
 listen for connections from given node.
 
void(* connect )(void *_instance, padico_topo_node_t node)
 connects a remote node through PSP
 
padico_psp_connection_t(* new_message )(void *_instance, padico_topo_node_t node, void **sbuf)
 begin a new outgoing message
 
void(* pack )(void *_instance, padico_psp_connection_t conn, const char *bytes, size_t size)
 add a new segment of data to an outgoing message
 
void(* end_message )(void *_instance, padico_psp_connection_t conn)
 terminates an outgoing message
 

Detailed Description

driver descriptor for the PSP interface.

Definition at line 112 of file PSP.h.

Field Documentation

◆ connect

void(* padico_psp_driver_s::connect) (void *_instance, padico_topo_node_t node)

connects a remote node through PSP

Parameters
_instancethe PSP instance status
nodethe remote node to connect to
Note
PSP implementations must support multiple calls to this function with the same 'node' parameter.

Definition at line 134 of file PSP.h.

Referenced by bench_psp_init(), and padico_psp_connect().

◆ end_message

void(* padico_psp_driver_s::end_message) (void *_instance, padico_psp_connection_t conn)

terminates an outgoing message

Parameters
_instancethe PSP instance status
connthe connection object of the message

Definition at line 156 of file PSP.h.

Referenced by bench_psp_send(), bench_psp_send(), bench_psp_send(), and padico_psp_end_message().

◆ init

void(* padico_psp_driver_s::init) (void *_instance, uint32_t tag, const char *label, size_t *h_size, padico_psp_handler_t handler, void *key)

init a new PSP instance

Parameters
_instancethe PSP instance status (driver-dependant)
tagthe tag identifying the PSP channel; statically allocated
labelthe name of the channel; used for debugging and dynamically allocated PSPs
h_sizesize of the header on the given channel; inout parameter: in=requested size; out=real size (out>=in)
handlerthe function that will be called upon message reception
keythe parameter that will be given to the callback function

Definition at line 122 of file PSP.h.

Referenced by bench_psp_init(), and padico_psp_init().

◆ listen

void(* padico_psp_driver_s::listen) (void *_instance, padico_topo_node_t node)

listen for connections from given node.

Binds the instance to the given remote node.

Definition at line 126 of file PSP.h.

Referenced by bench_psp_init(), and padico_psp_listen().

◆ new_message

padico_psp_connection_t(* padico_psp_driver_s::new_message) (void *_instance, padico_topo_node_t node, void **sbuf)

begin a new outgoing message

Parameters
_instancethe PSP instance status
nodethe recipient of the to-be-sent message
sbufthe sending buffer for headers ('out' parameters)
Returns
an opaque driver-dependant connection

Definition at line 142 of file PSP.h.

Referenced by bench_psp_send(), bench_psp_send(), bench_psp_send(), and padico_psp_new_message().

◆ pack

void(* padico_psp_driver_s::pack) (void *_instance, padico_psp_connection_t conn, const char *bytes, size_t size)

add a new segment of data to an outgoing message

Parameters
_instancethe PSP instance status
connthe connection object of the currently built message
bytespointer to the data to send
sizesize of the data to send

Definition at line 150 of file PSP.h.

Referenced by bench_psp_send(), bench_psp_send(), bench_psp_send(), and padico_psp_pack().


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