Menu

Error in CertificateUpdateReq while encoding using serialize1EXI2Stream !!

amy
2023-03-06
2023-03-06
  • amy

    amy - 2023-03-06

    Hi ,

    I am doing the encoding and decoding few request and response using https://sourceforge.net/projects/openv2g/files/
    here I have to encode CertificateUpdateReq and I am using "serialize1EXI2Stream()" API,
    but I am getting error.
    here I have attached the method which I have doing for encode.

     
  • Daniel Peintner

    Daniel Peintner - 2023-03-06

    Hi,

    I guess you need to share more details. * Source Code as images, grrr * What is the error code.. the number tells you the reason, see https://sourceforge.net/p/openv2g/code/HEAD/tree/trunk/src/codec/ErrorCodes.h * Which file are you using? * ....

    -- Daniel

     
  • amy

    amy - 2023-03-06

    I got error code as "#define EXI_ERROR_UNKOWN_EVENT -109" from "encode_iso1ExiDocument()" api
    file name : OpenV2G_0.9.5/src/iso1/iso1EXIDatatypesEncoder.c

     
  • Daniel Peintner

    Daniel Peintner - 2023-03-06

    This means that the encode was asked to encode something that is not valid.
    OpenV2G allows for encoding only valid XML portions. In most of the cases the C structs take care that the content is valid but there are still situation where this is not possible.
    e.g., the codec expects element a, b or c.
    IF none is given.. the codec will fail with -109. There are many more such cases.
    I suggest you to use the debugger and see what causes the issue.

     
  • amy

    amy - 2023-03-06

    error comming from writeBits() api as error code EXI_ERROR_OUTPUT_STREAM_EOF -11
    file name : OpenV2G_0.9.5/src/codec/BitOutputStream.c

     
  • amy

    amy - 2023-03-06

    error comming from writeBits() api as error code EXI_ERROR_OUTPUT_STREAM_EOF -11
    file name : OpenV2G_0.9.5/src/codec/BitOutputStream.c

     
  • Daniel Peintner

    Daniel Peintner - 2023-03-06

    Hi,

    I ask you to investigate a bit yourself.

    I assume you are writing to a byte array that is not large enough. I guess somehow here
    https://sourceforge.net/p/openv2g/code/HEAD/tree/trunk/src/test/main_databinder.c#l61 or similar code.

    This is the last time I answer questions were you just share some error codes.
    Please try to understand that is just guessing.

    -- Daniel

     

Log in to post a comment.