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

This commit is contained in:
Steffen Vogel 2017-12-06 16:45:38 +08:00
parent d85ce71366
commit f1c1ba527d
2 changed files with 4 additions and 4 deletions

View file

@ -43,8 +43,8 @@
#define SV_MAX_MESSAGE_SIZE 1518
struct sSVPublisher_ASDU {
char* svID;
char* datset;
const char* svID;
const char* datset;
int dataSize;
bool hasRefrTm;
@ -296,7 +296,7 @@ SVPublisher_create(CommParameters* parameters, const char* interfaceId)
}
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));

View file

@ -85,7 +85,7 @@ SVPublisher_create(CommParameters* parameters, const char* interfaceId);
* \return the new ASDU instance.
*/
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.