ECAT_Slave_in_ПЧ2П_c402  0.8
Реализация EtherCAT Slave для CM TMS320F28388D

Implementation The SDO server handles all sdo and sdo information services. Подробнее...

#include "ecat_def.h"
#include "ecatslv.h"
#include "objdef.h"
Граф включаемых заголовочных файлов для sdoserv.c:

См. исходные тексты.

Макросы

#define _SDOSERV_   1
 

Функции

UINT16 OBJ_GetDesc (UINT16 index, UINT8 subindex, OBJCONST TOBJECT OBJMEM *pObjEntry, UINT16 MBXMEM *pData)
 The function returns size and description string of the requested entry. Подробнее...
 
OBJCONST TSDOINFOENTRYDESC OBJMEMOBJ_GetEntryDesc (OBJCONST TOBJECT OBJMEM *pObjEntry, UINT8 Subindex)
 The function returns the Entry-Desc of a subindex to allow the application to define the object dictionary independent of the sdoserv-files. Подробнее...
 
OBJCONST TSDOINFOOBJDESC OBJMEMOBJ_GetObjDesc (OBJCONST TOBJECT OBJMEM *pObjEntry)
 The function returns the Obj-Desc of an object to allow the application to define the object dictionary independent of the sdoserv-files. Подробнее...
 
void SdoRes (UINT8 abort, UINT8 command, UINT8 completeAccess, UINT16 dataSize, UINT32 objLength, TINITSDOMBX MBXMEM *pSdoRes)
 This function is called when a SDO response shall be sent. Подробнее...
 
UINT8 SDOS_SdoInd (TINITSDOMBX MBXMEM *pSdoInd)
 This function is called when a SDO request service is received from the master and calls depending from the command the concerning function. Подробнее...
 
UINT8 SDOS_SdoInfoInd (TSDOINFORMATION MBXMEM *pSdoInfoInd)
 This function is called when a SDO-Info request service is received from the master and calls depending from the opcode the concerning function. Подробнее...
 

Переменные

OBJCONST TOBJECT OBJMEM asObjDef []
 
const UINT32 MBXMEM cAbortCode []
 
UINT16 VARMEM nSdoInfoIndex
 
OBJCONST TOBJECT OBJMEM *VARMEM pSdoInfoObjEntry
 

Подробное описание

Implementation The SDO server handles all sdo and sdo information services.

Автор
Ether.nosp@m.catS.nosp@m.SC@be.nosp@m.ckho.nosp@m.ff.co.nosp@m.m
Версия
5.13


Changes to version V5.12:
V5.13 COE5: handle complete access if segmented transfer is required, handle unsupported segmented uploads

Changes to version V5.11:
V5.12 COE2: do not clear the object index low byte in case of creating a SDO Abort
V5.12 COE5: updates in case of MBX_16BIT_ACCESS == 0
V5.12 COE6: handle get object length in case of an out of range subindex
V5.12 ECAT2: big endian changes
V5.12 EOE4: handle 16bit only acceess, move ethernet protocol defines and structures to application header files
V5.12 MBX3: handle incomplete mailbox communication
V5.12 TEST3: Send ping request or invalid mbx data in case of access to idx 0x1009

Changes to version V5.10:
V5.11 ECAT10: change PROTO handling to prevent compiler errors
V5.11 ECAT7: add missing big endian swapping
V5.11 SDO10: add new SDO abort code 0x6010004 (complete access not supported)
V5.11 SDO4: "if insufficient memory is available on complete download access return ""unsupported access"""

Changes to version V5.01:
V5.10 ESC5: Add missing swapping
V5.10 MBX1: Remove multiple swapping of length filed in mailbox header
V5.10 SDO3: Add new SDO Abort Code (0x06090033)
V5.10 SDO4: Block SDO Info services for indices less 0x1000
V5.10 SDO7: Correct mailbox length calculation on segmented or normal SDO upload response
V5.10 SDO8: Fix invalid fragment calculation on SdoInfo list response
V5.10 TEST5: test 0x2020.1 change limit from 10 to 16 Byte
Add test object 0x3009/0x300A (huge array and record objects)

Changes to version V5.0:
V5.01 MBX1: Allocate always complete 16Bit memory areas
V5.01 SDO2: Prevent invalid memory access in case of 8Bit mailbox memory handling
V5.01 SDO3: Update mailbox data length calculation
V5.01 SDO4: Update length calculation in case of an segmented SDO list response
V5.01 SDO6: Update SDO response interface handling. (used if the object access function returns "ABORTIDX_WORKING" and SDO_RES_INTERFACE is active)
V5.01 TEST2: Change Test 0x2020.1 (force Segmented transfer) to 16Byte

Changes to version V4.40:
V5.0 TEST1: Add test application. see Application Note ET9300 for more details.
V5.0 MBX3: Calculate MBX datagram length independent of SM size.
V5.0 SDO2: SDO toggle bit don not do be cleared for segmented communication.
V5.0 SDO3: Set SDO OpCode in list response.
V5.0 SDO4: Update abort code for "BIG_ENDIAN_16BIT" configuration.
V5.0 SDO5: Object code was calculated wrong for SDO Info service.
V5.0 SDO6: Handle SDO segmented transfer if only 16Bit MBX memory access is allowed.

Changes to version V4.20:
V4.40 SDO1: change size calculation for SDO services
V4.40 MBX1: Prevent accessing odd address
V4.40 COE1: Abort code is set in OBJ_GetObjectList()

Changes to version V4.11:
V4.20 PIC24: Add EL9800_4 (PIC24) required source code
V4.20 SDO 2: SDO mask value bug
V4.20 SDO 1: check zero size object length

Changes to version V4.10:
V4.11 SDO 1: fixed calculation of frame fragments during a object dictionary array list request
V4.11 SDO 2-3: fixed size of entry description
V4.11 SDO 4-7: add STRUCT_PACKED defines

Changes to version V4.08:
V4.10 SDO 1: fixed zero size SDO comparison
V4.10 SDO 2: set SdoService_CommandOffset to 0
V4.10 SDO 3: fixed zero size SDO comparison
V4.10 SDO 4: fixed struct_packed definition

Changes to version V4.07:
V4.08 SDO 1: For an upload segment response the toggle bit was overwritten
V4.08 SDO 2: For a segmented response the command was wrong in the response

Changes to version V4.06:
V4.07 SDO 1: In SdoRes the command specifier was not set correctly in case of an abort
V4.07 ECAT 1: The sources for SPI and MCI were merged (in ecat_def.h
set the switch MCI_HW to 1 when using the MCI,
set the switch SPI_HW to 1 when using the SPI

Changes to version V4.05:
V4.06 SDO 1: The variable dataSize was used wrong in function SdoRes

Changes to version V4.03:
V4.04 SDO 1: The SDO interface was changed in that way that a SDO response
could be sent by the application to a later time. In that case
the functions OBJ_Read and OBJ_Write shall return the value
ABORTIDX_WORKING. To send the SDO response the new function SDOS_SdoRes
has to be called by the application. While waiting for the call
of SDOS_SdoRes the SDO interface will answer to another SDO request
with the error MBXERR_SERVICEINWORK in the mailbox protocol

Changes to version V3.20:
V4.00 SDO 1: The size of the written data in case of a SDO Download will be
in the function OBJ_Write to be more flexible
V4.00 SDO 2: The object lists will be generated in the functions OBJ_GetNoOfObjects
and OBJ_GetObjectList in objdef.c to decouple the SDO services from
the implementation of the object dictionary
V4.00 SDO 3: The name of an object or entry description will only be transmitted
if it fits in the mailbox because the fragmentation is not supported in the sample code.
V4.00 SDO 4: SDOs with size greater than 65535 were not handled correctly, that is fixed now

См. определение в файле sdoserv.c