File syn_gbt27930.c¶
FileList > proto > syn_gbt27930.c
Go to the source code of this file
GB/T 27930 EV DC Fast Charging Protocol Implementation.
#include "syn_gbt27930.h"#include <string.h>
Public Functions¶
| Type | Name |
|---|---|
| void | syn_gbt27930_init (SYN_GBT27930_Session * session, SYN_GBT27930_Role role) Initialize GB/T 27930 Charging Session. |
| SYN_Status | syn_gbt27930_process_rx_frame (SYN_GBT27930_Session * session, const SYN_CAN_Frame * frame) Process incoming CAN frame on GB/T 27930 session. |
| SYN_Status | syn_gbt27930_start_handshake (SYN_GBT27930_Session * session) Start handshake phase. |
| bool | syn_gbt27930_step (SYN_GBT27930_Session * session, uint32_t dt_ms, SYN_CAN_Frame * tx_frame) Step session state machine timers and produce periodic CAN frames. |
| void | syn_gbt27930_stop_charging (SYN_GBT27930_Session * session, uint8_t reason) Stop charging session cleanly. |
Public Functions Documentation¶
function syn_gbt27930_init¶
Initialize GB/T 27930 Charging Session.
Parameters:
sessionPointer to session instance.roleNode role (SYN_GBT27930_ROLE_BMS or SYN_GBT27930_ROLE_CHARGER).
function syn_gbt27930_process_rx_frame¶
Process incoming CAN frame on GB/T 27930 session.
SYN_Status syn_gbt27930_process_rx_frame (
SYN_GBT27930_Session * session,
const SYN_CAN_Frame * frame
)
Parameters:
sessionPointer to session instance.framePointer to received CAN frame.
Returns:
SYN_OK if frame processed successfully.
function syn_gbt27930_start_handshake¶
Start handshake phase.
Parameters:
sessionPointer to session instance.
Returns:
SYN_OK on success.
function syn_gbt27930_step¶
Step session state machine timers and produce periodic CAN frames.
Parameters:
sessionPointer to session instance.dt_msMilliseconds elapsed since last call.tx_framePointer to CAN frame output buffer.
Returns:
true if tx_frame contains a CAN frame to transmit, false if idle.
function syn_gbt27930_stop_charging¶
Stop charging session cleanly.
Parameters:
sessionPointer to session instance.reasonStop reason code.
The documentation for this class was generated from the following file src/syntropic/proto/syn_gbt27930.c