Skip to content

Commit

Permalink
Version 0.1.0
Browse files Browse the repository at this point in the history
    - Fix typo in readme
    - Update Changelog
    - Update app.src
    - Add rebar.lock
    - Encode undefined attribute as invalid attribute id errors.

 	* Do not encode undefines as an empty option set anymore.
 	* Change the default of option set node attributes to be empty lists.

Signed-off-by: Luca Succi <[email protected]>
  • Loading branch information
ziopio committed Feb 16, 2023
1 parent b8458f2 commit a9802f8
Show file tree
Hide file tree
Showing 11 changed files with 47 additions and 19 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
_build
_*
*.lock
.rebar3
.tool-versions
.DS_Store
Expand Down
10 changes: 3 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,9 @@ and this project adheres to

## [Unreleased]

## [0.1.0] - yyy-mm-dd
## [0.1.0] - 2023-02-16

### Added

### Changed

### Fixed
Initial Public Release

[Unreleased]: https://github.com/stritzinger/opcua/compare/0.1.0...HEAD
[0.1.0]: https://github.com/stritzinger/opcua/compare/put-commit-here...0.1.0
[0.1.0]: https://github.com/stritzinger/opcua/compare/ad570a824e7ed0c6eef79166f6c12c05ab4c0ee9...0.1.0
6 changes: 3 additions & 3 deletions include/opcua.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@
display_name :: opcua:optional(binary()),
description :: opcua:optional(binary()),
%TODO: create a type for write mask option set
write_mask :: opcua:optional(list(atom())),
user_write_mask :: opcua:optional(list(atom())),
write_mask = [] :: opcua:optional(list(atom())),
user_write_mask = [] :: opcua:optional(list(atom())),
%FIXME: Role permision typing is broken
role_permissions :: opcua:optional(opcua:role_permission()),
user_role_permissions :: opcua:optional(opcua:role_permissions()),
%TODO: create a type for access restriction option set
access_restrictions :: opcua:optional(list(atom()))
access_restrictions = [] :: opcua:optional(list(atom()))
}).

-record(opcua_object, {
Expand Down
Binary file modified priv/nodeset/data/nodeset.datatypes.bterm
Binary file not shown.
Binary file modified priv/nodeset/data/nodeset.nodes.bterm
Binary file not shown.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

A native Erlang implementation of the OPCUA Binary Protocol.

We use erlang 25 or develop and test this application.
We use erlang 25 to develop and test this application.

[![Tests](https://github.com/stritzinger/opcua/actions/workflows/tests.yml/badge.svg)](https://github.com/stritzinger/opcua/actions/workflows/tests.yml)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/stritzinger/opcua/blob/master/LICENSE)
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
{apps, [opcua, ranch, xmerl, recon, runtime_tools]}
]}.

{relx, [{release, {opcua, "1.0.0"},
{relx, [{release, {opcua, "0.1.0"},
[opcua, ranch, xmerl, recon]},
{dev_mode, true},
{include_erts, false},
Expand Down
17 changes: 17 additions & 0 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{"1.2.0",
[{<<"quickrand">>,{pkg,<<"quickrand">>,<<"2.0.5">>},1},
{<<"ranch">>,{pkg,<<"ranch">>,<<"1.7.1">>},0},
{<<"recon">>,{pkg,<<"recon">>,<<"2.5.0">>},0},
{<<"uuid">>,{pkg,<<"uuid_erl">>,<<"2.0.5">>},0}]}.
[
{pkg_hash,[
{<<"quickrand">>, <<"06FCAD85CB47D5C85C51D6BC9C84A082501BA098A89D64AD0A2F69599E034C04">>},
{<<"ranch">>, <<"6B1FAB51B49196860B733A49C07604465A47BDB78AA10C1C16A3D199F7F8C881">>},
{<<"recon">>, <<"2F7FCBEC2C35034BADE2F9717F77059DC54EB4E929A3049CA7BA6775C0BD66CD">>},
{<<"uuid">>, <<"60FAEEB7EDFD40847ED13CB0DD1044BAABE4E79A00C0CA9C4D13A073914B1016">>}]},
{pkg_hash_ext,[
{<<"quickrand">>, <<"252CF0493570EBF1A58985CB71990982CDDCD4396B6427F1E10CF58924C1C052">>},
{<<"ranch">>, <<"451D8527787DF716D99DC36162FCA05934915DB0B6141BBDAC2EA8D3C7AFC7D7">>},
{<<"recon">>, <<"72F3840FEDD94F06315C523F6CECF5B4827233BED7AE3FE135B2A0EBEAB5E196">>},
{<<"uuid">>, <<"E54373262CA88401689277947C54B95E9ECBC977BD5C57C9DD44AD9DA278E360">>}]}
].
23 changes: 20 additions & 3 deletions src/opcua.app.src
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{application, opcua,
[{description, "An OTP application"},
[{description, "OPCUA Erlang library"},
{vsn, "0.1.0"},
{registered, []},
{mod, {opcua, []}},
Expand All @@ -15,6 +15,23 @@
{env,[]},
{modules, []},

{licenses, ["Apache 2.0"]},
{links, []}
{licenses, [
"Apache 2.0"
]},
{links, [
{"Homepage", "https://github.com/stritzinger/opcua"},
{"Changelog", "https://github.com/stritzinger/opcua/blob/master/CHANGELOG.md"},
{"GitHub", "https://github.com/stritzinger/opcua"}
]},
{files, [
"certificates",
"priv/nodeset",
"scripts",
"include",
"src",
"LICENSE",
"README.md",
"rebar.config",
"rebar.lock"
]}
]}.
3 changes: 0 additions & 3 deletions src/opcua_codec_binary.erl
Original file line number Diff line number Diff line change
Expand Up @@ -359,9 +359,6 @@ encode_schema(Ctx, #opcua_enum{fields = Fields}, Name) ->
{Value, Data2, Ctx2} = encode_builtin(?PUSHF(Ctx, value), int32,
Field#opcua_field.value),
{Value, Data2, ?POPF(Ctx2, value)};
encode_schema(Ctx, #opcua_option_set{mask_type = MaskNodeId}, undefined) ->
% If the option set is undefined, encode it as empty
encode_type(Ctx, MaskNodeId, 0);
encode_schema(Ctx, #opcua_option_set{mask_type = MaskNodeId,
fields = Fields}, OptionSet) ->
ChosenFields = [Field || Field = #opcua_field{name = Name} <- Fields,
Expand Down
2 changes: 2 additions & 0 deletions src/opcua_server_registry.erl
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ static_perform(_Mode, Node, #opcua_read_command{attr = Attr, range = undefined}
[opcua_node:format(Node), Attr]),
Result = try {opcua_node:attribute_type(Attr, Node),
opcua_node:attribute(Attr, Node)} of
{_AttrType, undefined} ->
#opcua_data_value{status = bad_attribute_id_invalid};
{AttrType, AttrValue} ->
try opcua_codec:pack_variant(opcua_server_space, AttrType, AttrValue) of
Value -> #opcua_data_value{value = Value}
Expand Down

0 comments on commit a9802f8

Please sign in to comment.