Zephyr Project API 4.2.99
A Scalable Open Source RTOS
|
OCPP Charge Point Implementation. More...
Data Structures | |
union | ocpp_io_value |
OCPP user callback notification/request of input/output values union member should be accessed with enum value ocpp_notify_reason correspondingly. More... | |
struct | ocpp_cp_info |
Parameters for ocpp_init information about Charge Point (CP) all are string literal except num_of_con. More... | |
struct | ocpp_cs_info |
Parameters for ocpp_init information about central system (CS) More... | |
Macros | |
#define | CISTR50 50 |
Max length of string literals e.g idtag. | |
Typedefs | |
typedef void * | ocpp_session_handle_t |
Parameters opaque session handle for ocpp_* API. | |
typedef int(* | ocpp_user_notify_callback_t) (enum ocpp_notify_reason reason, union ocpp_io_value *io, void *user_data) |
Asynchronous event notification callback registered by the application. | |
Functions | |
int | ocpp_init (struct ocpp_cp_info *cpi, struct ocpp_cs_info *csi, ocpp_user_notify_callback_t cb, void *user_data) |
OCPP library init. | |
int | ocpp_session_open (ocpp_session_handle_t *hndl) |
API to request a new Session. | |
void | ocpp_session_close (ocpp_session_handle_t hndl) |
API to close a Session. | |
int | ocpp_authorize (ocpp_session_handle_t hndl, char *idtag, enum ocpp_auth_status *status, uint32_t timeout_ms) |
Authorize request call to CS to get validity of idtag. | |
int | ocpp_start_transaction (ocpp_session_handle_t hndl, int meter_val, uint8_t conn_id, uint32_t timeout_ms) |
Notify transaction start to CS. | |
int | ocpp_stop_transaction (ocpp_session_handle_t hndl, int meter_val, uint32_t timeout_ms) |
Notify transaction stopped to CS. | |
OCPP Charge Point Implementation.
#define CISTR50 50 |
#include <include/zephyr/net/ocpp.h>
Max length of string literals e.g idtag.
typedef void* ocpp_session_handle_t |
#include <include/zephyr/net/ocpp.h>
Parameters opaque session handle for ocpp_* API.
typedef int(* ocpp_user_notify_callback_t) (enum ocpp_notify_reason reason, union ocpp_io_value *io, void *user_data) |
#include <include/zephyr/net/ocpp.h>
Asynchronous event notification callback registered by the application.
advised callback should not be hold for longer time to unblock the ocpp protocol stack/lib.
[in] | reason | for callback invoked. |
[in] | io | reffered corresponding to reason. |
[in] | user_data | passed on ocpp_init. |
enum ocpp_auth_status |
#include <include/zephyr/net/ocpp.h>
OCPP IdTag authorization status in result to ocpp request authorization.
enum ocpp_meter_measurand |
#include <include/zephyr/net/ocpp.h>
OCPP meter readings to be filled on user callback request from library.
enum ocpp_notify_reason |
#include <include/zephyr/net/ocpp.h>
int ocpp_authorize | ( | ocpp_session_handle_t | hndl, |
char * | idtag, | ||
enum ocpp_auth_status * | status, | ||
uint32_t | timeout_ms | ||
) |
#include <include/zephyr/net/ocpp.h>
Authorize request call to CS to get validity of idtag.
[in] | hndl | session handle |
[in] | idtag | (string literal) to get authorize validity |
[out] | status | authorization status |
[in] | timeout_ms | timeout in msec |
int ocpp_init | ( | struct ocpp_cp_info * | cpi, |
struct ocpp_cs_info * | csi, | ||
ocpp_user_notify_callback_t | cb, | ||
void * | user_data | ||
) |
#include <include/zephyr/net/ocpp.h>
OCPP library init.
[in] | cpi | Charge Point information |
[in] | csi | Central System information |
[in] | cb | user register callback |
[in] | user_data | same reference will be passed on callback |
void ocpp_session_close | ( | ocpp_session_handle_t | hndl | ) |
#include <include/zephyr/net/ocpp.h>
API to close a Session.
[in] | hndl | a handle received from session open |
int ocpp_session_open | ( | ocpp_session_handle_t * | hndl | ) |
#include <include/zephyr/net/ocpp.h>
API to request a new Session.
[out] | hndl | a valid opaque handle |
int ocpp_start_transaction | ( | ocpp_session_handle_t | hndl, |
int | meter_val, | ||
uint8_t | conn_id, | ||
uint32_t | timeout_ms | ||
) |
#include <include/zephyr/net/ocpp.h>
Notify transaction start to CS.
[in] | hndl | session handle |
[in] | meter_val | energy meter reading of this connector in Wh |
[in] | conn_id | connector id should be > 0 and sequential number |
[in] | timeout_ms | timeout in msec |
int ocpp_stop_transaction | ( | ocpp_session_handle_t | hndl, |
int | meter_val, | ||
uint32_t | timeout_ms | ||
) |
#include <include/zephyr/net/ocpp.h>
Notify transaction stopped to CS.
[in] | hndl | session handle |
[in] | meter_val | energy meter reading of this connector in Wh |
[in] | timeout_ms | timeout in msec |