Read Power at Given Port Clause Samples
Read Power at Given Port. Uses a proprietary extension to the OFPT_STATS_REQUEST command with type set to OFPST_CPORT = 0x18 and a following data block laid out as: struct ofp_cport_stats_request { uint16_t port_no; uint8_t direction; uint8_t pad[5]; }; OFP_ASSERT(sizeof(struct ofp_cport_stats_request) == 8); The OFPST_PORT message must request statistics either for a single port (specified in port_no) or for all ports (if port_no == OFPP_NONE). The response appears in the corresponding OFPT_STATS_REPLY, with a proprietary body either once or multiple times: struct ofp_cport_stats { uint16_t port_no; uint16_t pmonset_lambda; uint16_t pmonset_offset; uint16_t pmonset_atime; uint32_t mes_pmon; uint8_t pad[4]; /* Align to 64-bits. */ uint8_t voaset_mode; uint8_t voaset_level; uint8_t voaset_ref; uint8_t pad1[5]; /* Align to 64-bits. */ }; uint64_t port_alarms; OFP_ASSERT(sizeof(struct ofp_cport_stats) == 32); If a value is unsupported, the field is set to all ones.
