new mib crate

This commit is contained in:
2022-11-27 22:05:42 +01:00
parent 7e0d3f394a
commit b0b41a07dc
19 changed files with 341 additions and 65 deletions

View File

@ -1,8 +1,8 @@
//! Basic check which just verifies that everything compiles
use satrs_core::resultcode::ResultU16;
use satrs_core::res_code::ResultU16;
use satrs_macros::*;
#[resultcode(info = "This is a test result where the first parameter is foo")]
const TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
const _TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
fn main() {}

View File

@ -1,10 +1,11 @@
use satrs_core::resultcode::{ResultU16, ResultU16Ext};
use satrs_core::res_code::ResultU16;
use satrs_macros::*;
use satrs_mib::res_code::ResultU16Info;
#[resultcode(info = "This is a test result where the first parameter is foo")]
const TEST_RESULT: ResultU16 = ResultU16::const_new(0, 1);
// Create named reference of auto-generated struct, which can be used by IDEs etc.
const TEST_RESULT_EXT_REF: &ResultU16Ext = &TEST_RESULT_EXT;
const TEST_RESULT_EXT_REF: &ResultU16Info = &TEST_RESULT_EXT;
fn main() {
assert_eq!(TEST_RESULT_EXT.name, "TEST_RESULT");