- fixed bug #307
This commit is contained in:
parent
5547adf853
commit
b42aa358e9
4 changed files with 16 additions and 6 deletions
|
@ -65,7 +65,7 @@
|
|||
<FCDA ldInst="GenericIO" lnClass="GGIO" fc="MX" lnInst="1" doName="AnIn4" daName="q" />
|
||||
</DataSet>
|
||||
|
||||
<ReportControl name="EventsRCB" confRev="1" datSet="Events" rptID="Events1" buffered="false" intgPd="1000" bufTime="50">
|
||||
<ReportControl name="EventsRCB" confRev="4294967295" datSet="Events" rptID="Events1" buffered="false" intgPd="1000" bufTime="50">
|
||||
<TrgOps period="true" />
|
||||
<OptFields seqNum="true" timeStamp="true" dataSet="true" reasonCode="true" entryID="true" configRef="true" />
|
||||
<RptEnabled max="1" />
|
||||
|
|
|
@ -1944,7 +1944,7 @@ extern ReportControlBlock iedModel_GenericIO_LLN0_report4;
|
|||
extern ReportControlBlock iedModel_GenericIO_LLN0_report5;
|
||||
extern ReportControlBlock iedModel_GenericIO_LLN0_report6;
|
||||
|
||||
ReportControlBlock iedModel_GenericIO_LLN0_report0 = {&iedModel_GenericIO_LLN0, "EventsRCB01", "Events1", false, "Events", 1, 8, 111, 50, 1000, &iedModel_GenericIO_LLN0_report1};
|
||||
ReportControlBlock iedModel_GenericIO_LLN0_report0 = {&iedModel_GenericIO_LLN0, "EventsRCB01", "Events1", false, "Events", 4294967295, 8, 111, 50, 1000, &iedModel_GenericIO_LLN0_report1};
|
||||
ReportControlBlock iedModel_GenericIO_LLN0_report1 = {&iedModel_GenericIO_LLN0, "EventsIndexed01", "Events2", false, "Events", 1, 8, 111, 50, 1000, &iedModel_GenericIO_LLN0_report2};
|
||||
ReportControlBlock iedModel_GenericIO_LLN0_report2 = {&iedModel_GenericIO_LLN0, "EventsIndexed02", "Events2", false, "Events", 1, 8, 111, 50, 1000, &iedModel_GenericIO_LLN0_report3};
|
||||
ReportControlBlock iedModel_GenericIO_LLN0_report3 = {&iedModel_GenericIO_LLN0, "EventsIndexed03", "Events2", false, "Events", 1, 8, 111, 50, 1000, &iedModel_GenericIO_LLN0_report4};
|
||||
|
|
|
@ -187,6 +187,7 @@ BerEncoder_revertByteOrder(uint8_t* octets, const int size)
|
|||
int
|
||||
BerEncoder_compressInteger(uint8_t* integer, int originalSize)
|
||||
{
|
||||
|
||||
uint8_t* integerEnd = integer + originalSize - 1;
|
||||
uint8_t* bytePosition;
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ setIntegerValue(Asn1PrimitiveValue* self, uint8_t* valueBuffer, int bufferSize)
|
|||
Asn1PrimitiveValue*
|
||||
BerInteger_createInt32()
|
||||
{
|
||||
return Asn1PrimitiveValue_create(4);
|
||||
return Asn1PrimitiveValue_create(5);
|
||||
}
|
||||
|
||||
Asn1PrimitiveValue*
|
||||
|
@ -124,7 +124,16 @@ BerInteger_setUint32(Asn1PrimitiveValue* self, uint32_t value)
|
|||
uint32_t valueCopy = value;
|
||||
uint8_t* valueBuffer = (uint8_t*) &valueCopy;
|
||||
|
||||
return setIntegerValue(self, valueBuffer, sizeof(value));
|
||||
uint8_t byteBuffer[5];
|
||||
byteBuffer[4] = 0;
|
||||
|
||||
|
||||
int i;
|
||||
for (i = 0; i < 4; i++) {
|
||||
byteBuffer[i] = valueBuffer[i];
|
||||
}
|
||||
|
||||
return setIntegerValue(self, byteBuffer, 5);
|
||||
}
|
||||
|
||||
Asn1PrimitiveValue*
|
||||
|
@ -139,7 +148,7 @@ BerInteger_createFromUint32(uint32_t value)
|
|||
Asn1PrimitiveValue*
|
||||
BerInteger_createInt64()
|
||||
{
|
||||
return Asn1PrimitiveValue_create(64);
|
||||
return Asn1PrimitiveValue_create(9);
|
||||
}
|
||||
|
||||
int
|
||||
|
@ -184,7 +193,7 @@ BerInteger_toInt32(Asn1PrimitiveValue* self, int32_t* nativeValue)
|
|||
int /* 1 - if conversion is possible, 0 - out of range */
|
||||
BerInteger_toUint32(Asn1PrimitiveValue* self, uint32_t* nativeValue)
|
||||
{
|
||||
if (self->size < 5) {
|
||||
if (self->size < 6) {
|
||||
uint8_t* buf = self->octets;
|
||||
int i;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue