CTRE Phoenix 6 C++ 25.0.0-beta-4
Loading...
Searching...
No Matches
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
37
38 } // namespace can
39 } // namespace platform
40 } // namespace phoenix
41} // namespace ctre
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
#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 StatusCodes.h:18
"plain old data" container for holding a CAN Frame Event.
Definition canframe.hpp:20