Skip to content

Commit

Permalink
Work in progress
Browse files Browse the repository at this point in the history
  • Loading branch information
locka99 committed Mar 29, 2022
1 parent 69ebfef commit 0f834b4
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 17 deletions.
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@

# These settings are present to demonstrate minimal binary size in release mode. Don't forget to strip the executable
# too.
[profile.release]
opt-level = 'z'
lto = true
panic = 'abort'

[workspace]
Expand Down
2 changes: 1 addition & 1 deletion lib/src/server/address_space/address_space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ use super::super::{
callbacks, constants,
diagnostics::ServerDiagnostics,
historical::HistoryServerCapabilities,
session::SessionManager,
state::ServerState,
};
use crate::session::SessionManager;

/// Finds a node in the address space and coerces it into a reference of the expected node type.
macro_rules! find_node {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/server/address_space/data_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use crate::types::service_types::DataTypeAttributes;

use crate::address_space::{base::Base, node::Node, node::NodeBase};
use super::{base::Base, node::Node, node::NodeBase};

node_builder_impl!(DataTypeBuilder, DataType);

Expand Down
15 changes: 7 additions & 8 deletions lib/src/server/address_space/method.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ use std::sync::{Arc, RwLock};

use crate::types::service_types::{Argument, MethodAttributes};

use crate::{
address_space::{
address_space::MethodCallback,
base::Base,
node::{Node, NodeBase},
variable::VariableBuilder,
},
session::SessionManager,
use super::{
address_space::MethodCallback,
base::Base,
node::{Node, NodeBase},
variable::VariableBuilder,
};

use super::super::session::SessionManager;

node_builder_impl!(MethodBuilder, Method);
node_builder_impl_component_of!(MethodBuilder);
node_builder_impl_generates_event!(MethodBuilder);
Expand Down
2 changes: 1 addition & 1 deletion lib/src/server/address_space/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::types::{
NodeId, NumericRange, QualifiedName, TimestampsToReturn, Variant, WriteMask,
};

use crate::address_space::types::{
use super::types::{
DataType, Method, Object, ObjectType, ReferenceType, Variable, VariableType, View,
};

Expand Down
2 changes: 1 addition & 1 deletion lib/src/server/session_diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::collections::HashMap;

use crate::types::{node_ids::ObjectTypeId, service_types::ServiceCounterDataType};

use super::super::{
use super::{
address_space::{address_space::AddressSpace, object::ObjectBuilder},
session::Session,
};
Expand Down
3 changes: 2 additions & 1 deletion tools/schema/gen_address_space.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,8 @@ let config = {
max_nodes_per_file: MAX_NODES_PER_FILE,
autogenerated_by: "tools/schema/gen_address_space.js",
trace: trace,
copyright: true
copyright: true,
opcua_server_crate: true
}

let modules = [];
Expand Down
8 changes: 5 additions & 3 deletions tools/schema/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,10 @@ function generate_enum_types(bsd_file, enums, rs_types_dir) {
#![allow(unused_attributes)]
#![allow(non_upper_case_globals)]
use std::io::{Read, Write};
use crate::encoding::*;
use crate::status_codes::StatusCode;
use crate::types::{
encoding::*,
status_codes::StatusCode,
};
use bitflags;
`;

Expand Down Expand Up @@ -371,7 +373,7 @@ impl BinaryEncoder<${enum_type.name}> for ${enum_type.name} {

function generate_type_imports(structured_types, fields_to_add, fields_to_hide, has_message_info) {
let imports = `#[allow(unused_imports)]
use crate::{
use crate::types::{
encoding::*,
basic_types::*,
`;
Expand Down

0 comments on commit 0f834b4

Please sign in to comment.