StatusCode
Status code is a 32-bit integer. Integer is what logger libraries, process exit codes, operating systems use. The code address semantics is not tightly mandated, but the following bit schema is recommended.
Bit | Mask | Description |
---|---|---|
0-15 | 0x0000FFFF | Code |
16-30 | 0x3FFF0000 | Namespace |
31-32 | 0xC0000000 | Severity |
Namespace allocation
Third party libraries should pick a namespace number from unused ranges.
Namespace | Allocation |
---|---|
0x0000 -> 0x01FF | Reserved for OPC-UA |
0x0200 -> 0x0A79 | unused |
0x0A7A | Avalanche.* |
0x0A7B -> 0x3FFF | unused |
Avalanche Namespace
Avalanche namespace is 0x0A7A0000.
Under the namespace ranges are allocated as following.
Code Range | Allocation |
---|---|
0xC000 - 0xC0FF | Avalanche.Core |
0xC010 | Avalanche.Identity |
0xC020 | Avalanche.Serialization |
0xC030 | Avalanche.Localization |
0xC040 | Reserved |
0xC050 | Avalanche.Service |
0xC060 | Avalanche.Service |
0xC070 | Reserved |
0xC080 | Avalanche.Core |
0xC0A0 | Avalanche.Accessor |
0xC0B0 | Avalanche.Binding |
0xC0C0 | Avalanche.Converter |
0xC0D0 | Avalanche.DataType |
0xC0E0 | Avalanche.Writer |
0xC0F0 | Avalanche.FileSystem |
0x4A00 - 0x4AFF | Avalanche.OpcUa |
0x4A00 | Avalanche.OpcUa.Common |
0x4AC0 - 0x4ACF | Avalanche.OpcUa.Client |
0x4A50 - 0x4A5F | Avalanche.OpcUa.Server |
Full Example
Full example
using System.Collections.Generic;
using Avalanche.Utilities;
using static System.Console;
class statuscode
{
public static void Run()
{
{
// <01>
// </01>
}
{
// <02>
// </02>
}
}
}