Skip to content

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.

void syn_gbt27930_init (
    SYN_GBT27930_Session * session,
    SYN_GBT27930_Role role
) 

Parameters:

  • session Pointer to session instance.
  • role Node 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:

  • session Pointer to session instance.
  • frame Pointer to received CAN frame.

Returns:

SYN_OK if frame processed successfully.


function syn_gbt27930_start_handshake

Start handshake phase.

SYN_Status syn_gbt27930_start_handshake (
    SYN_GBT27930_Session * session
) 

Parameters:

  • session Pointer to session instance.

Returns:

SYN_OK on success.


function syn_gbt27930_step

Step session state machine timers and produce periodic CAN frames.

bool syn_gbt27930_step (
    SYN_GBT27930_Session * session,
    uint32_t dt_ms,
    SYN_CAN_Frame * tx_frame
) 

Parameters:

  • session Pointer to session instance.
  • dt_ms Milliseconds elapsed since last call.
  • tx_frame Pointer 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.

void syn_gbt27930_stop_charging (
    SYN_GBT27930_Session * session,
    uint8_t reason
) 

Parameters:

  • session Pointer to session instance.
  • reason Stop reason code.


The documentation for this class was generated from the following file src/syntropic/proto/syn_gbt27930.c