| xCore-SDK 0.7.1 xCore SDK C# API

ethercat_cli.hpp
浏览该文件的文档.
1
5#pragma once
6#ifndef XCORESDK_SRC_MANAGED_ETHERCAT_CLI_HPP_
7#define XCORESDK_SRC_MANAGED_ETHERCAT_CLI_HPP_
8
9#include "data_types_cli.hpp"
10
11 namespace rokae {
12 class BaseEthercat;
13}
14
15 namespace rokae::clr {
16
20 public ref class BaseEthercat {
21 private:
22 ::rokae::BaseEthercat* raw_;
23
24 public:
26 BaseEthercat(::rokae::BaseEthercat&& src);
27 ~BaseEthercat();
28 !BaseEthercat();
29
30 bool ReadSDO(int slave_addr, int index, int sub_index, int length, array<Byte>^% data, int over_time,
31 [System::Runtime::InteropServices::Out] ErrorCode^% ec);
32 bool WriteSDO(int slave_addr, int index, int sub_index, int length, array<Byte>^ data, int over_time,
33 [System::Runtime::InteropServices::Out] ErrorCode^% ec);
34 bool WriteMultiSDO(System::UInt16 slave_addr, List<SDOData^>^ items,
35 [System::Runtime::InteropServices::Out] ErrorCode^% ec);
36 int GetSlaveCount([System::Runtime::InteropServices::Out] ErrorCode^% ec);
37 SlaveInfo GetSlaveInfo(int slave_addr, [System::Runtime::InteropServices::Out] ErrorCode^% ec);
38 List<SlaveInfo>^ GetSlavesInfo([System::Runtime::InteropServices::Out] ErrorCode^% ec);
39 bool SetSlavesState(System::UInt16 state, [System::Runtime::InteropServices::Out] ErrorCode^% ec);
40 System::UInt16 GetSlaveState(int slave_addr, [System::Runtime::InteropServices::Out] ErrorCode^% ec);
41 bool ReadPDO(int slave_addr, int offset, int size, array<Byte>^% data,
42 [System::Runtime::InteropServices::Out] ErrorCode^% ec);
43 bool WritePDO(int slave_addr, int offset, int size, array<Byte>^ data,
44 [System::Runtime::InteropServices::Out] ErrorCode^% ec);
45 };
46}
47
48#endif
rokae::clr::BaseEthercat
EtherCAT 从站访问（与 C++ BaseRobot::ethercat() / rokae::BaseEthercat 对应）
Definition: ethercat_cli.hpp:20
rokae::clr::BaseEthercat::BaseEthercat
BaseEthercat(::rokae::BaseEthercat &&src)
由 BaseRobot::ethercat() 构造。
rokae::clr::ErrorCode
xCoreSDK错误码
Definition: data_types_cli.hpp:24
data_types_cli.hpp
rokae::clr::SlaveInfo
EtherCAT 从站信息（与 rokae::SlaveInfo 对应）
Definition: data_types_cli.hpp:627