Skip to content

Commit

Permalink
Put a copyright at the top of crate files
Browse files Browse the repository at this point in the history
  • Loading branch information
locka99 committed May 16, 2020
1 parent 3dcf5d2 commit 3672bd6
Show file tree
Hide file tree
Showing 126 changed files with 505 additions and 3 deletions.
4 changes: 4 additions & 0 deletions client/src/builder.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::path::PathBuf;

use opcua_core::config::Config;
Expand Down
4 changes: 4 additions & 0 deletions client/src/callbacks.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Provides callback traits and concrete implementations that the client can use to register for notifications
//! with the client api.
//!
Expand Down
4 changes: 4 additions & 0 deletions client/src/client.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Client setup and session creation.
use std::{
Expand Down
4 changes: 4 additions & 0 deletions client/src/comms/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Client side communications
mod transport;
Expand Down
4 changes: 4 additions & 0 deletions client/src/comms/tcp_transport.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! The OPC UA TCP transport client module. The transport is responsible for establishing a connection
//! with the server and processing requests.
//!
Expand Down
4 changes: 4 additions & 0 deletions client/src/comms/transport.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

/// A trait common to all transport implementations
pub(crate) trait Transport {
// Common functions will go here
Expand Down
4 changes: 4 additions & 0 deletions client/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Client configuration data.
use std::{
Expand Down
4 changes: 4 additions & 0 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! The OPC UA Client module contains the functionality necessary for a client to connect to an OPC UA server,
//! authenticate itself, send messages, receive responses, get values, browse the address space and
//! provide callbacks for things to be propagated to the client.
Expand Down
4 changes: 4 additions & 0 deletions client/src/message_queue.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::collections::{HashMap, HashSet};

use futures::sync::mpsc::{self, UnboundedReceiver, UnboundedSender};
Expand Down
4 changes: 4 additions & 0 deletions client/src/session.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Session functionality for the current open client connection. This module contains functions
//! to call for all typically synchronous operations during an OPC UA session.
//!
Expand Down
4 changes: 4 additions & 0 deletions client/src/session_retry.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use chrono::{DateTime, TimeZone, Utc};
use time::Duration;

Expand Down
4 changes: 4 additions & 0 deletions client/src/session_state.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::{
self,
sync::{
Expand Down
4 changes: 4 additions & 0 deletions client/src/subscription.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Provides subscription and monitored item tracking.
//!
//! The structs and functions in this file allow the client to maintain a shadow copy of the
Expand Down
4 changes: 4 additions & 0 deletions client/src/subscription_state.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::collections::HashMap;
use std::sync::{Arc, RwLock};

Expand Down
4 changes: 4 additions & 0 deletions client/src/subscription_timer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::{
sync::{Arc, RwLock},
thread,
Expand Down
4 changes: 4 additions & 0 deletions console-logging/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

#[macro_use]
extern crate log;
#[macro_use]
Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/chunker.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Contains code for turning messages into chunks and chunks into messages.
use std;
Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/message_chunk.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! A message chunk is a message or a portion of a message, optionally encrypted & signed, which
//! has been split for transmission.
Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/message_chunk_info.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std;
use std::io::Cursor;

Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/message_writer.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::io::{Cursor, Write};

use opcua_types::{
Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Contains all code related to sending / receiving messages from a transport
//! and turning those messages into and out of chunks.
Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/secure_channel.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use chrono;
use opcua_crypto::{
aeskey::AesKey,
Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/security_header.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::io::{Read, Write};

use opcua_types::*;
Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/tcp_codec.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! The codec is an implementation of a tokio Encoder/Decoder which can be used to read
//! data from the socket in terms of frames which in our case are any of the following:
//!
Expand Down
6 changes: 5 additions & 1 deletion core/src/comms/tcp_types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
//! Contains the implementation of various UA over TCP types.
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Contains the implementation of various UA over TCP types.
use std::io::{Cursor, Error, ErrorKind, Read, Result, Write};

Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/url.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Provides functions for parsing Urls from strings.
use std;
Expand Down
4 changes: 4 additions & 0 deletions core/src/comms/wrapped_tcp_stream.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::io::{self, Read, Write};

use bytes::{Buf, BufMut};
Expand Down
4 changes: 4 additions & 0 deletions core/src/completion_pact.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! This type and the use of it is adapted from an answer on this discussion.
//!
//! https://stackoverflow.com/questions/42462441/how-to-cleanly-break-tokio-core-event-loop-and-futuresstream-in-rust
Expand Down
4 changes: 4 additions & 0 deletions core/src/config.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::result::Result;
use std::path::Path;
use std::fs::File;
Expand Down
4 changes: 4 additions & 0 deletions core/src/handle.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::u32;

/// A simple handle factory for incrementing sequences of numbers.
Expand Down
4 changes: 4 additions & 0 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! The OPC UA Core module holds functionality that is common to server and clients that make use of OPC UA.
//! It contains message chunking, cryptography / pki, communications and standard handshake messages.
Expand Down
4 changes: 4 additions & 0 deletions core/src/runtime.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use std::{
collections::BTreeSet,
sync::{Arc, Mutex},
Expand Down
4 changes: 4 additions & 0 deletions crypto/src/aeskey.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Symmetric encryption / decryption wrapper.
use opcua_types::status_code::StatusCode;
use openssl::symm::{Cipher, Crypter, Mode};
Expand Down
4 changes: 4 additions & 0 deletions crypto/src/certificate_store.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! The certificate store holds and retrieves private keys and certificates from disk. It is responsible
//! for checking certificates supplied by the remote end to see if they are valid and trusted or not.
use opcua_types::service_types::ApplicationDescription;
Expand Down
4 changes: 4 additions & 0 deletions crypto/src/hash.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Hashing functions used for producing and verifying digital signatures
use std::result::Result;
Expand Down
4 changes: 4 additions & 0 deletions crypto/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Crypto related functionality. It is used for establishing
//! trust between a client and server via certificate exchange and validation. It also used for
//! encrypting / decrypting messages and signing messages.
Expand Down
4 changes: 4 additions & 0 deletions crypto/src/pkey.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Asymmetric encryption / decryption, signing / verification wrapper.
use std::{
self,
Expand Down
4 changes: 4 additions & 0 deletions crypto/src/random.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Module contains functions for creating cryptographically strong random bytes.
use openssl::rand;
Expand Down
4 changes: 4 additions & 0 deletions crypto/src/security_policy.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Security policy is the symmetric, asymmetric encryption / decryption + signing / verification
//! algorithms to use and enforce for the current session.
use opcua_types::{
Expand Down
4 changes: 4 additions & 0 deletions crypto/src/thumbprint.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Functionality for holding a message digest.
use opcua_types::ByteString;

Expand Down
4 changes: 4 additions & 0 deletions crypto/src/user_identity.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Functions related to encrypting / decrypting passwords in a UserNameIdentityToken.
//!
//! The code here determines how or if to encrypt the password depending on the security policy
Expand Down
4 changes: 4 additions & 0 deletions crypto/src/x509.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

// X509 certificate wrapper.

use std::{
Expand Down
7 changes: 5 additions & 2 deletions server/src/address_space/address_space.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
//! Implementation of `AddressSpace`.
//!
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Implementation of `AddressSpace`.
use std::collections::HashMap;
use std::sync::{Arc, Mutex, RwLock};

Expand Down
4 changes: 4 additions & 0 deletions server/src/address_space/base.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use opcua_types::{
*,
status_code::StatusCode,
Expand Down
4 changes: 4 additions & 0 deletions server/src/address_space/data_type.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Contains the implementation of `Method` and `MethodBuilder`.
use opcua_types::service_types::DataTypeAttributes;
Expand Down
4 changes: 4 additions & 0 deletions server/src/address_space/method.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Contains the implementation of `Method` and `MethodBuilder`.
use opcua_types::service_types::{Argument, MethodAttributes};
Expand Down
4 changes: 4 additions & 0 deletions server/src/address_space/method_impls.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use opcua_types::*;
use opcua_types::status_code::StatusCode;
use opcua_types::service_types::{CallMethodRequest, CallMethodResult};
Expand Down
4 changes: 4 additions & 0 deletions server/src/address_space/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

//! Provides functionality to create an address space, find nodes, add nodes, change attributes
//! and values on nodes.
Expand Down
4 changes: 4 additions & 0 deletions server/src/address_space/node.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// OPCUA for Rust
// SPDX-License-Identifier: MPL-2.0
// Copyright (C) 2020 Adam Lock

use opcua_types::{
AttributeId, DataValue, LocalizedText, NodeId, NumericRange, QualifiedName, service_types::NodeClass, status_code::StatusCode,
Variant, WriteMask,
Expand Down
Loading

0 comments on commit 3672bd6

Please sign in to comment.