sv: use const for SvId and DatSet attributes as they are read-only

pull/39/head
Steffen Vogel 8 years ago
parent d85ce71366
commit f1c1ba527d

@ -43,8 +43,8 @@
#define SV_MAX_MESSAGE_SIZE 1518 #define SV_MAX_MESSAGE_SIZE 1518
struct sSVPublisher_ASDU { struct sSVPublisher_ASDU {
char* svID; const char* svID;
char* datset; const char* datset;
int dataSize; int dataSize;
bool hasRefrTm; bool hasRefrTm;
@ -296,7 +296,7 @@ SVPublisher_create(CommParameters* parameters, const char* interfaceId)
} }
SVPublisher_ASDU SVPublisher_ASDU
SVPublisher_addASDU(SVPublisher self, char* svID, char* datset, uint32_t confRev) SVPublisher_addASDU(SVPublisher self, const char* svID, const char* datset, uint32_t confRev)
{ {
SVPublisher_ASDU newAsdu = (SVPublisher_ASDU) GLOBAL_CALLOC(1, sizeof(struct sSVPublisher_ASDU)); SVPublisher_ASDU newAsdu = (SVPublisher_ASDU) GLOBAL_CALLOC(1, sizeof(struct sSVPublisher_ASDU));

@ -85,7 +85,7 @@ SVPublisher_create(CommParameters* parameters, const char* interfaceId);
* \return the new ASDU instance. * \return the new ASDU instance.
*/ */
SVPublisher_ASDU SVPublisher_ASDU
SVPublisher_addASDU(SVPublisher self, char* svID, char* datset, uint32_t confRev); SVPublisher_addASDU(SVPublisher self, const char* svID, const char* datset, uint32_t confRev);
/** /**
* \brief Prepare the publisher for publishing. * \brief Prepare the publisher for publishing.

Loading…
Cancel
Save