CTRE Phoenix 6 C++ 24.3.0
NetworkAPI.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
10#include "ctre/phoenix/export.h"
12#include <set>
13#include <sstream>
14#include <stdint.h>
15
16namespace ctre
17{
18 namespace phoenix
19 {
20 namespace platform
21 {
22 namespace can
23 {
24
25 CTREXPORT StatusCode Network_GetLastTx(std::string const &canbus, uint32_t arbId, canframe_t &frame);
26 CTREXPORT bool Network_ChangeTxPeriod(std::string const &canbus, uint32_t arbId, int32_t periodMs);
27
28 CTREXPORT StatusCode Network_SendTxFrame(std::string const &canbus, canframe_t const &frame);
29 CTREXPORT StatusCode Network_SendPeriodicTxFrame(std::string const &canbus, canframe_t const &frame, int32_t periodMs);
30 CTREXPORT StatusCode Network_UpdatePeriodicTxFrame(std::string const &canbus, canframe_t const &frame);
31 CTREXPORT StatusCode Network_StopPeriodicTxFrame(std::string const &canbus, uint32_t arbId);
32
33 CTREXPORT StatusCode Network_GetRxFrame(char const *canbus, uint32_t arbId, canframe_t &frame, uint32_t timeoutMs);
34 CTREXPORT StatusCode Network_WaitForRxFrames(char const *canbus, std::set<uint32_t> const &arbIds, uint16_t timeoutMs);
35
36 CTREXPORT StatusCode Network_SetEnableSignalSchedPriority(int priority, bool useRoundRobin);
37
38 } // namespace can
39 } // namespace platform
40 } // namespace phoenix
41} // namespace ctre
#define CTREXPORT
Definition: export.h:14
CTREXPORT StatusCode Network_GetLastTx(std::string const &canbus, uint32_t arbId, canframe_t &frame)
CTREXPORT StatusCode Network_SendPeriodicTxFrame(std::string const &canbus, canframe_t const &frame, int32_t periodMs)
CTREXPORT StatusCode Network_UpdatePeriodicTxFrame(std::string const &canbus, canframe_t const &frame)
CTREXPORT StatusCode Network_GetRxFrame(char const *canbus, uint32_t arbId, canframe_t &frame, uint32_t timeoutMs)
CTREXPORT bool Network_ChangeTxPeriod(std::string const &canbus, uint32_t arbId, int32_t periodMs)
CTREXPORT StatusCode Network_SendTxFrame(std::string const &canbus, canframe_t const &frame)
CTREXPORT StatusCode Network_StopPeriodicTxFrame(std::string const &canbus, uint32_t arbId)
CTREXPORT StatusCode Network_WaitForRxFrames(char const *canbus, std::set< uint32_t > const &arbIds, uint16_t timeoutMs)
CTREXPORT StatusCode Network_SetEnableSignalSchedPriority(int priority, bool useRoundRobin)
Definition: string_util.hpp:15
"plain old data" container for holding a CAN Frame Event.
Definition: canframe.hpp:20