set relayCapable to true, tried to fix the emptystring creation and added bookingContactInfo
This commit is contained in:
parent
6920e5bc69
commit
d98d059def
15
src/evcsnm.c
15
src/evcsnm.c
|
|
@ -21,11 +21,22 @@
|
|||
#include <it2s-tender/recorder.h>
|
||||
#include <it2s-tender/packet.h>
|
||||
|
||||
static UTF8String_t *create_utf8_from_string(const char* string, size_t length) {
|
||||
UTF8String_t *utf8_string = calloc(1, sizeof(UTF8String_t));
|
||||
utf8_string->buf = calloc(length + 1, sizeof(uint8_t));
|
||||
utf8_string->size = length + 1;
|
||||
memcpy(utf8_string->buf, string, length);
|
||||
utf8_string->buf[length] = '\0';
|
||||
return utf8_string;
|
||||
}
|
||||
|
||||
|
||||
static UTF8String_t *create_empty_utf8_string()
|
||||
{
|
||||
UTF8String_t *utf8_string = calloc(1, sizeof(UTF8String_t));
|
||||
utf8_string->buf = calloc(1, 1);
|
||||
utf8_string->size = 1;
|
||||
utf8_string->buf[0] = '\0';
|
||||
return utf8_string;
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +56,7 @@ static int mk_evcsnm(uint8_t *evcsnm_oer, uint32_t *evcsnm_len)
|
|||
|
||||
evcsnm->evcsn.poiHeader.poiType = 1; // set to "EV charging station POI ID = 1"
|
||||
asn_ulong2INTEGER(&evcsnm->evcsn.poiHeader.timeStamp, now);
|
||||
evcsnm->evcsn.poiHeader.relayCapable = 0;
|
||||
evcsnm->evcsn.poiHeader.relayCapable = 1;
|
||||
|
||||
evcsnm->evcsn.evcsnData.totalNumberOfStations = 1;
|
||||
evcsnm->evcsn.evcsnData.chargingStationsData.list.array = calloc(1, sizeof(void *));
|
||||
|
|
@ -66,6 +77,8 @@ static int mk_evcsnm(uint8_t *evcsnm_oer, uint32_t *evcsnm_len)
|
|||
cs0->accessibility = *create_empty_utf8_string();
|
||||
cs0->pricing = *create_empty_utf8_string();
|
||||
cs0->openingDaysHours = *create_empty_utf8_string();
|
||||
const booking_url = "ccam.av.it.pt";
|
||||
cs0->bookingContactInfo = create_utf8_from_string(booking_url, strlen(booking_url));
|
||||
cs0->chargingSpotsAvailable.list.array = calloc(1, sizeof(void *));
|
||||
cs0->chargingSpotsAvailable.list.count = 1;
|
||||
cs0->chargingSpotsAvailable.list.size = sizeof(void *) * 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue