Lely core libraries 2.3.4
|
This header file is part of the CANopen library; it contains the Server-SDO declarations. More...
Go to the source code of this file.
Functions | |
co_ssdo_t * | co_ssdo_create (can_net_t *net, co_dev_t *dev, co_unsigned8_t num) |
Creates a new CANopen Server-SDO service. More... | |
void | co_ssdo_destroy (co_ssdo_t *sdo) |
Destroys a CANopen Server-SDO service. More... | |
int | co_ssdo_start (co_ssdo_t *sdo) |
Starts a Server-SDO service. More... | |
void | co_ssdo_stop (co_ssdo_t *sdo) |
Stops a Server-SDO service. More... | |
int | co_ssdo_is_stopped (const co_ssdo_t *sdo) |
Retuns 1 if the specified Server-SDO service is stopped, and 0 if not. More... | |
can_net_t * | co_ssdo_get_net (const co_ssdo_t *sdo) |
Returns a pointer to the CAN network of a Server-SDO. | |
co_dev_t * | co_ssdo_get_dev (const co_ssdo_t *sdo) |
Returns a pointer to the CANopen device of a Server-SDO. | |
co_unsigned8_t | co_ssdo_get_num (const co_ssdo_t *sdo) |
Returns the SDO number of a Server-SDO. | |
const struct co_sdo_par * | co_ssdo_get_par (const co_ssdo_t *sdo) |
Returns a pointer to the SDO parameter record of a Server-SDO. | |
int | co_ssdo_get_timeout (const co_ssdo_t *sdo) |
Returns the timeout (in milliseconds) of a Server-SDO. More... | |
void | co_ssdo_set_timeout (co_ssdo_t *sdo, int timeout) |
Sets the timeout of a Server-SDO. More... | |
This header file is part of the CANopen library; it contains the Server-SDO declarations.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file ssdo.h.
Creates a new CANopen Server-SDO service.
The service is started as if by co_ssdo_start().
net | a pointer to a CAN network. |
dev | a pointer to a CANopen device describing the server. |
num | the SDO number (in the range [1..128]). Except when num is 1, the SDO parameter record MUST exist in the object dictionary of dev. |
void co_ssdo_destroy | ( | co_ssdo_t * | sdo | ) |
Destroys a CANopen Server-SDO service.
int co_ssdo_start | ( | co_ssdo_t * | sdo | ) |
Starts a Server-SDO service.
void co_ssdo_stop | ( | co_ssdo_t * | sdo | ) |
Stops a Server-SDO service.
Any ongoing request is aborted.
int co_ssdo_is_stopped | ( | const co_ssdo_t * | sdo | ) |
Retuns 1 if the specified Server-SDO service is stopped, and 0 if not.
int co_ssdo_get_timeout | ( | const co_ssdo_t * | sdo | ) |
Returns the timeout (in milliseconds) of a Server-SDO.
A return value of 0 (the default) means no timeout is being used.
void co_ssdo_set_timeout | ( | co_ssdo_t * | sdo, |
int | timeout | ||
) |
Sets the timeout of a Server-SDO.
If the timeout expires before receiving a request from a client, the server aborts the transfer.
sdo | a pointer to a Server-SDO service. |
timeout | the timeout (in milliseconds). A value of 0 (the default) disables the timeout. |