Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code formatting of nodeset_compiler output #6450

Open
1 of 7 tasks
guenhter opened this issue Apr 30, 2024 · 0 comments
Open
1 of 7 tasks

Code formatting of nodeset_compiler output #6450

guenhter opened this issue Apr 30, 2024 · 0 comments

Comments

@guenhter
Copy link

Description

When the C code from a nodest is created with the nodeset_compiler, the code is completely flat without any indentation like this:

/* WARNING: This is a generated file.
 * Any manual changes will be overwritten. */

#include "myNs.h"


/* StatusTechnicalMessageType - ns=1;i=3018 */

static UA_StatusCode function_myNs_0_begin(UA_Server *server, UA_UInt16* ns) {
UA_StatusCode retVal = UA_STATUSCODE_GOOD;
UA_DataTypeAttributes attr = UA_DataTypeAttributes_default;
attr.displayName = UA_LOCALIZEDTEXT("", "StatusTechnicalMessageType ");
retVal |= UA_Server_addNode_begin(server, UA_NODECLASS_DATATYPE,UA_NODEID_NUMERIC(ns[1], 3018LU),UA_NODEID_NUMERIC(ns[0], 22LU),UA_NODEID_NUMERIC(ns[0], 45LU),UA_QUALIFIEDNAME(ns[1], "StatusTechnicalMessageType "), UA_NODEID_NULL,(const UA_NodeAttributes*)&attr, &UA_TYPES[UA_TYPES_DATATYPEATTRIBUTES],NULL, NULL);
return retVal;
}

If would be very nice if the code would have at least some indentation on function level.

Background Information / Reproduction Steps

I'm using the latest nodeset_compiler from the master branch

Used CMake options:

cmake -DUA_NAMESPACE_ZERO=<YOUR_OPTION> <ANY_OTHER_OPTIONS> ..

Checklist

Please provide the following information:

  • open62541 Version (release number or git tag):
  • Other OPC UA SDKs used (client or server):
  • Operating system:
  • Logs (with UA_LOGLEVEL set as low as necessary) attached
  • Wireshark network dump attached
  • Self-contained code example attached
  • Critical issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant