Incomming AT Command

When handling incomming AT commands, OpenAt uses the structure typedefed as adl_atCmdPreParster_t. The last element therein is StrData, defined as (in fact) char [1]. In the typedef it is “asscii”, which in turn is typdefed with char, so in fact StrData is a character array with dimension 1. The comment in the ADL user guide states “Incomming command address”, in the header file adl_CmdHandler.h the comment states “Incomming command string buffer address”. With char StrData[1] in my opinion there is not defined an address. So both comments are nonsense. StrData is defined as a single character, one byte, which could contain an address in a “all-8-bit” CPU, but never ever in a 32bit CPU.

In fact StrData contains the complete commandline, a string probably quite long. In our case for example well to 50 byte. In spite of the bizarre definition in the typedef, the command-line parser works well. So no problems have popped up by now. With this definition and our command lines i would expect peculiar behaviour. But the behaviour of our system is normal. No overwritten data in memory or the like. So a question to all programming guys here: How comes it out, that despite this bizarre definition all works well?

Harald Wehner