Added ec_sdo_request_copy().
--- a/master/sdo_request.c Thu Nov 06 15:45:40 2008 +0000
+++ b/master/sdo_request.c Tue Nov 25 12:31:53 2008 +0000
@@ -95,6 +95,22 @@
/*****************************************************************************/
+/** Copy another Sdo request.
+ *
+ * \attention Only the index subindex and data are copied.
+ */
+int ec_sdo_request_copy(
+ ec_sdo_request_t *req,
+ const ec_sdo_request_t *other
+ )
+{
+ req->index = other->index;
+ req->subindex = other->subindex;
+ return ec_sdo_request_copy_data(req, other->data, other->data_size);
+}
+
+/*****************************************************************************/
+
/** Sdo request destructor.
*/
void ec_sdo_request_clear_data(
--- a/master/sdo_request.h Thu Nov 06 15:45:40 2008 +0000
+++ b/master/sdo_request.h Tue Nov 25 12:31:53 2008 +0000
@@ -77,6 +77,7 @@
void ec_sdo_request_init(ec_sdo_request_t *);
void ec_sdo_request_clear(ec_sdo_request_t *);
+int ec_sdo_request_copy(ec_sdo_request_t *, const ec_sdo_request_t *);
void ec_sdo_request_address(ec_sdo_request_t *, uint16_t, uint8_t);
int ec_sdo_request_alloc(ec_sdo_request_t *, size_t);
int ec_sdo_request_copy_data(ec_sdo_request_t *, const uint8_t *, size_t);