MCPcopy Create free account
hub / github.com/ReversecLabs/C3 / GetUsage

Method GetUsage

Src/ChannelLinter/ArgumentParser.cpp:33–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 std::string ArgumentParser::GetUsage() const
34 {
35 return "Usage: " + m_AppName.filename().string() + R"( {-h|-l|-n NAME [options]}
36Mode:
37 -h, --help Show this message and exit.
38
39 -l, --list List registered Channels and exit.
40
41 -n <NAME>, --name <NAME>
42 Select channel with given <NAME> for further processing
43
44Options:
45 -a [ARGS...], --args [ARGS...]
46 Create channel with given ARGS using the Capability/create/arguments.
47
48 -c [ARGS...], --complementary [ARGS...]
49 Create a complementary channel with given ARGS.
50
51 -i, --test-io Create a pair of channels and send packets through.
52 If this option is present -a [ARGS...] must be specified.
53 If -c is not present, complementary channel arguments are deduced by swapping
54 parameters from Capability/create/arguments arrays.
55
56 -o, --overlapped Changes way IO test is performed.
57 For each sent chunk of packet, complementary channel must read it.
58 Packet order test is not performed.
59
60 -x <ID> [ARGS... ], --command <ID> [ARGS... ]
61 Execute a command with a given <ID> and arguments [ARGS...]
62
63Examples:
64 1. Parse the json returned from GetCapability and validate it against C3 rules:
65 ChannelLinter.exe -n UncShareFile
66
67 2. Create instance of a channel:
68 ChannelLinter.exe -n UncShareFile --args inputId outputId C:\Temp\C3Store false
69
70 3. Test channel permeability - create a complementary pair of channels and send messages through.
71 ChannelLinter.exe -n UncShareFile --args inputId outputId C:\Temp\C3Store false -i
72
73 4. Execute channel command:
74 ChannelLinter.exe -n UncShareFile --args inputId outputId C:\Temp\C3Store false -x 0
75)";
76 }
77
78 void ArgumentParser::FillConfig()
79 {

Callers 1

mainFunction · 0.80

Calls 1

stringMethod · 0.45

Tested by

no test coverage detected