# Introduction ## What is MainDevice Object Dictionary? Like SubDevices may support diagnosis and configuration that can be accessed by means of asynchronous SDO uploads, the EC-Master stack contains the possibility to get access to such objects similarly. The MainDevice implements the mandatory objects of the SubDevice and enhances some useful things in the vendor definable areas. Find a close documentation to Object Dictionary structure in this document. ## How to access MainDevice Object Dictionary The way for the application to access the MainDevice’s Object Dictionary is the same as for accessing the of Object Dictionary of SubDevices. The only difference is the parameter slave id that must be set to *MASTER_SLAVE_ID*: > - *emCoeSdoUpload(…,MASTER_SLAVE_ID, …);* > - *emCoeSdoDownload(…,MASTER_SLAVE_ID, …);* > - *emCoeGetODList(…,MASTER_SLAVE_ID, …);* > - … Some objects, e.g. *0x1018* are read-only for *emCoeSdo…* access, but the value can be changed by the application. This can be accomplished by means of *EC_IOCTL_MASTEROD_SET_VALUE*, see below. Complete access to objects of type OBJCODE_VAR is not possible. #### SEE ALSO [`emCoeSdoUpload()`](mbx_coe.html.md#_CPPv414emCoeSdoUpload10EC_T_DWORD10EC_T_DWORD9EC_T_WORD9EC_T_BYTEP9EC_T_BYTE10EC_T_DWORDP10EC_T_DWORD10EC_T_DWORD10EC_T_DWORD), [`emCoeSdoDownload()`](mbx_coe.html.md#_CPPv416emCoeSdoDownload10EC_T_DWORD10EC_T_DWORD9EC_T_WORD9EC_T_BYTEPK9EC_T_BYTE10EC_T_DWORD10EC_T_DWORD10EC_T_DWORD), [`emCoeGetODList()`](mbx_coe.html.md#_CPPv414emCoeGetODList10EC_T_DWORD10EC_T_DWORD20EC_T_COE_ODLIST_TYPEP9EC_T_BYTE10EC_T_DWORDP15EC_T_COE_ODLIST10EC_T_DWORD) for the CoE API used to access the object dictionary The MainDevice Object Dictionary follows the little-endian byte ordering convention. ## emIoCtl - EC_IOCTL_MASTEROD_SET_VALUE ### EC_IOCTL_MASTEROD_SET_VALUE Sets the value of the Object Entry with the given Index and SubIndex in the MainDevice Object Dictionary. #### NOTE Cannot be used by a RAS Client application, nor for Object Entries located at SubDevices. Complete access is not supported. * **Parameters:** * **pbyInBuf** – [in] Pointer to struct [EC_T_MASTEROD_OBJECT_PARMS](#d7/d4e/struct_e_c___t___m_a_s_t_e_r_o_d___o_b_j_e_c_t___p_a_r_m_s) * **dwInBufSize** – [in] Size of the input buffer provided at pbyInBuf in bytes * **pbyOutBuf** – [out] Should be set to EC_NULL * **dwOutBufSize** – [in] Should be set to 0 * **pdwNumOutData** – [out] Should be set to EC_NULL * **Returns:** [EC_E_NOERROR](error-codes_generic.html.md#d3/d2f/group___e_c___e_r_r_o_r___c_o_d_e_s___g_e_n_e_r_i_c_1ga8c8419c32e88e73d940a4501fe427116) or error code ### struct EC_T_MASTEROD_OBJECT_PARMS ### Public Members ### [EC_T_WORD](toc_api.html.md#_CPPv49EC_T_WORD) wIndex Object’s index, e.g. 0x1018 ### [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) bySubindex Object’s sub-index, e.g. 1 ### [EC_T_BYTE](toc_api.html.md#_CPPv49EC_T_BYTE) \*pbyData Pointer to object’s data to be written ### [EC_T_DWORD](toc_api.html.md#_CPPv410EC_T_DWORD) dwLength Data length in bytes to be written #### SEE ALSO [Overview](od_overview.html.md#overview) for the Object Entries that are forceable (column **F**)