This repository has been archived on 2026-02-22. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
can/Inc/mmr_can_scs_manager.h
T
Nicola Gutierrez 607817389c Add SCS manager
bozza
2022-02-17 17:22:27 +01:00

37 lines
766 B
C

#ifndef INC_MMR_CAN_SCS_MANAGER_H_
#define INC_MMR_CAN_SCS_MANAGER_H_
#include "mmr_can.h"
#include "mmr_can_timer_scs.h"
/**
* TODO:
* - GetCurrentTime
* - ACK
* - Reset timer
* - Setup method
*/
/**
* @brief Represents the base-struct to manage a single RTR
* and allows to interface with the associated SCS's timer
*/
typedef struct {
MmrCanMessageId scsId;
CanId receiverId;
int rtr;
} RTRresponse;
/**
* It is used to iterate the RTRresponse array in the CheckSCS function
*/
static int counter;
bool MMR_CAN_SetRTRresponse(MmrCanMessageId scsId, CanId receiverId, int rtr);
TimerRange MMR_CAN_GetCurrentTime();
void MMR_CAN_CheckSCS(); // What is necessary to do ritrasmission (mmr_can_send_scs)
#endif // !INC_MMR_CAN_SCS_MANAGER_H_