[EthercatDevice_XXX]
描述
(CoE) 獲取從站的指定 Object 描述資訊。
格式
int getObjectDescription(uint16_t od_index, uint16_t *datatype, uint8_t *max_od_subindex, uint8_t *objcode, char *objname, size_t objname_size, uint32_t *abortcode = NULL, uint32_t timeout_us = ECAT_DEFAULT_COE_TIMEOUT_US);
語法
EthercatDevice_XXX slave;
slave.getObjectDescription();
參數
uint16_t od_index
:CANOpen 物件索引。uint16_t *datatype
:物件數據類型。uint8_t *max_od_subindex
:最大的 CANOpen 物件子索引。uint8_t *objcode
:物件代碼。char *objname
:物件名稱的緩衝區。size_t objname_size
:物件名稱的緩衝區長度。uint32_t *abortcode
:SDO 錯誤程式碼的指標。uint32_t timeout_us
:超時,單位為一微秒。
回傳
Int: >=0 for Length of Object name; if the return value is smaller than 0 means error.
函式庫參考主頁面
86Duino 參考的文本是根據 Creative Commons Attribution-ShareAlike 3.0 License,部分文本是從 the Arduino reference 修改的。 參考中的代碼示例已發佈到公共領域。