Skip to content

how to access global variable within the command function? #67

@HyunjunAhn

Description

@HyunjunAhn

Hi. I have a question while testing the library. I would like to know how to access global variables within the command function registered through the cli_register_command().

If the value of the global variable changed inside main() is printed using cli_print() in the command function, it is not reflected, and on the contrary, the value of the global variable changed inside the command function is not properly displayed in main().
Also, is there a way to telnet output using cli_print() inside another function not registered through cli_register_command()?

Do you ever have a similar problem?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions