Example program with HTTPServer and sensor data streaming over TCPSockets, using Donatien Garnier's Net APIs and services code on top of LWIP. Files StreamServer.h and .cpp encapsulate streaming over TCPSockets. Broadcast is done by sendToAll(), and all incoming data is echoed back to the client. Echo code can be replaced with some remote control of the streaming interface. See main() that shows how to periodically send some data to all subscribed clients. To subscribe, a client should open a socket at <mbed_ip> port 123. I used few lines in TCL code to set up a quick sink for the data. HTTP files are served on port 80 concurrently to the streaming.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

mib_node Struct Reference

mib_node Struct Reference

node "base class" layout, the mandatory fields for a node More...

#include <snmp_structs.h>

Data Fields

void(* get_object_def )(u8_t ident_len, s32_t *ident, struct obj_def *od)
 returns struct obj_def for the given object identifier
void(* get_value )(struct obj_def *od, u16_t len, void *value)
 returns object value for the given object identifier,
u8_t(* set_test )(struct obj_def *od, u16_t len, void *value)
 tests length and/or range BEFORE setting
void(* set_value )(struct obj_def *od, u16_t len, void *value)
 sets object value, only to be called when set_test()
u8_t node_type
 One out of MIB_NODE_AR, MIB_NODE_LR or MIB_NODE_EX.

Detailed Description

node "base class" layout, the mandatory fields for a node

Definition at line 106 of file snmp_structs.h.


Field Documentation

void(* get_object_def)(u8_t ident_len, s32_t *ident, struct obj_def *od)

returns struct obj_def for the given object identifier

Definition at line 109 of file snmp_structs.h.

void(* get_value)(struct obj_def *od, u16_t len, void *value)

returns object value for the given object identifier,

Note:
the caller must allocate at least len bytes for the value

Definition at line 112 of file snmp_structs.h.

u8_t node_type

One out of MIB_NODE_AR, MIB_NODE_LR or MIB_NODE_EX.

Definition at line 118 of file snmp_structs.h.

u8_t(* set_test)(struct obj_def *od, u16_t len, void *value)

tests length and/or range BEFORE setting

Definition at line 114 of file snmp_structs.h.

void(* set_value)(struct obj_def *od, u16_t len, void *value)

sets object value, only to be called when set_test()

Definition at line 116 of file snmp_structs.h.