Skip to content

Commit

Permalink
open62541 building on 64-bit systems
Browse files Browse the repository at this point in the history
  • Loading branch information
ttrau committed Jan 7, 2020
1 parent 7f0afd4 commit 290b060
Show file tree
Hide file tree
Showing 20 changed files with 179 additions and 40 deletions.
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ sudo ldconfig # update libs
sudo ldconfig -p | grep libopen62541 # check if its there
```

or on 64-bit systems:

```sh
sudo echo "/usr/local/lib64" > /etc/ld.so.conf.d/local.conf # add to libs path
sudo ldconfig # update libs
sudo ldconfig -p | grep libopen62541 # check if its there
```

## Development

Use rake to build c bindings:
Expand Down
2 changes: 1 addition & 1 deletion example/bug5.rb → example/client/bug5.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
require_relative '../lib/opcua/server'
require_relative '../../lib/opcua/server'

Daemonite.new do
server = OPCUA::Server.new
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
require_relative '../lib/opcua/client'
require_relative '../../lib/opcua/client'
#require 'opcua/client'

### username & pass in url (e.g. siemens)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
require_relative '../lib/opcua/client'
require_relative '../../lib/opcua/client'
#require 'opcua/client'

### username & pass in url (e.g. siemens)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
require_relative '../lib/opcua/client'
require_relative '../../lib/opcua/client'
#require 'opcua/client'

### username & pass in url (e.g. siemens)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
require_relative '../lib/opcua/client'
require_relative '../../lib/opcua/client'
#require 'opcua/client'

### username & pass in url (e.g. siemens)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
require_relative '../lib/opcua/client'
require_relative '../../lib/opcua/client'
#require 'opcua/client'

### username & pass in url (e.g. siemens)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/ruby
# require 'opcua/server'
require_relative '../lib/opcua/server'
require_relative '../../lib/opcua/server'

Daemonite.new do
on startup do |opts|
Expand Down
34 changes: 34 additions & 0 deletions example/nodeset/small_nodeset.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
require 'nokogiri'

def is_necessary(node)
necessary = [
"StateMachineType"
]
find_follow(node)
false
end

def find_follow(node)
follow = [
"HasComponent",
"HasSubtype"
]
node.xpath('xmlns:References/xmlns:Reference').each do |ref|
node.xpath("parent::*/*[@NodeId='#{ref.content}']").each do |fnode|
puts "lol"
end if follow.include? ref['ReferenceType']
end
false
end

nodeset = Nokogiri::XML(File.read(File.join(File.dirname(__FILE__), "../../lib/opcua/Opc.Ua.1.04.NodeSet2.xml")))

nodeset.xpath("/*/*").each do |node|
unless node.name == 'UAReferenceType'
if node['NodeId'] =~ /i=(.*)/ && $1.to_i > 1000
node.remove unless is_necessary node
end
end
end

File.write(File.join(File.dirname(__FILE__), "../../lib/opcua/Opc.Ua.thin.NodeSet2.xml"), nodeset.to_xml)
File renamed without changes.
2 changes: 1 addition & 1 deletion example/server.rb → example/server/server.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
require_relative '../lib/opcua/server'
require_relative '../../lib/opcua/server'
#require 'opcua/server'

Daemonite.new do
Expand Down
2 changes: 1 addition & 1 deletion example/server_deep.rb → example/server/server_deep.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
require_relative '../lib/opcua/server'
require_relative '../../lib/opcua/server'
# require 'opcua/server'

Daemonite.new do
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/ruby
require_relative '../lib/opcua/server'
require_relative '../../lib/opcua/server'
#require 'opcua/server'

Daemonite.new do
Expand Down
File renamed without changes.
11 changes: 0 additions & 11 deletions example/small_nodeset.rb

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,13 @@
</References>
<InverseName>GeneratedBy</InverseName>
</UAReferenceType>

<UAReferenceType NodeId="i=3065" BrowseName="AlwaysGeneratesEvent">
<DisplayName>AlwaysGeneratesEvent</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=41</Reference>
</References>
<InverseName>AlwaysGeneratedBy</InverseName>
</UAReferenceType>
<UAReferenceType NodeId="i=44" BrowseName="Aggregates" IsAbstract="true">
<DisplayName>Aggregates</DisplayName>
<References>
Expand Down Expand Up @@ -1497,6 +1503,13 @@



<UAReferenceType NodeId="i=15112" BrowseName="HasGuard">
<DisplayName>HasGuard</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=47</Reference>
</References>
<InverseName>GuardOf</InverseName>
</UAReferenceType>



Expand Down Expand Up @@ -1839,10 +1852,31 @@



<UAReferenceType NodeId="i=17597" BrowseName="HasDictionaryEntry">
<DisplayName>HasDictionaryEntry</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=32</Reference>
</References>
<InverseName>DictionaryEntryOf</InverseName>
</UAReferenceType>




<UAReferenceType NodeId="i=17603" BrowseName="HasInterface">
<DisplayName>HasInterface</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=32</Reference>
</References>
<InverseName>InterfaceOf</InverseName>
</UAReferenceType>
<UAReferenceType NodeId="i=17604" BrowseName="HasAddIn">
<DisplayName>HasAddIn</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=32</Reference>
</References>
<InverseName>AddInOf</InverseName>
</UAReferenceType>



Expand Down Expand Up @@ -1892,6 +1926,34 @@



<UAReferenceType NodeId="i=9004" BrowseName="HasTrueSubState">
<DisplayName>HasTrueSubState</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=32</Reference>
</References>
<InverseName>IsTrueSubStateOf</InverseName>
</UAReferenceType>
<UAReferenceType NodeId="i=9005" BrowseName="HasFalseSubState">
<DisplayName>HasFalseSubState</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=32</Reference>
</References>
<InverseName>IsFalseSubStateOf</InverseName>
</UAReferenceType>
<UAReferenceType NodeId="i=16361" BrowseName="HasAlarmSuppressionGroup">
<DisplayName>HasAlarmSuppressionGroup</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=47</Reference>
</References>
<InverseName>IsAlarmSuppressionGroupOf</InverseName>
</UAReferenceType>
<UAReferenceType NodeId="i=16362" BrowseName="AlarmGroupMember">
<DisplayName>AlarmGroupMember</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=35</Reference>
</References>
<InverseName>MemberOfAlarmGroup</InverseName>
</UAReferenceType>



Expand Down Expand Up @@ -2191,6 +2253,41 @@



<UAReferenceType NodeId="i=9006" BrowseName="HasCondition">
<DisplayName>HasCondition</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=32</Reference>
</References>
<InverseName>IsConditionOf</InverseName>
</UAReferenceType>
<UAReferenceType NodeId="i=17276" BrowseName="HasEffectDisable">
<DisplayName>HasEffectDisable</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=54</Reference>
</References>
<InverseName>MayBeDisabledBy</InverseName>
</UAReferenceType>
<UAReferenceType NodeId="i=17983" BrowseName="HasEffectEnable">
<DisplayName>HasEffectEnable</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=54</Reference>
</References>
<InverseName>MayBeEnabledBy</InverseName>
</UAReferenceType>
<UAReferenceType NodeId="i=17984" BrowseName="HasEffectSuppressed">
<DisplayName>HasEffectSuppressed</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=54</Reference>
</References>
<InverseName>MayBeSuppressedBy</InverseName>
</UAReferenceType>
<UAReferenceType NodeId="i=17985" BrowseName="HasEffectUnsuppressed">
<DisplayName>HasEffectUnsuppressed</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=54</Reference>
</References>
<InverseName>MayBeUnsuppressedBy</InverseName>
</UAReferenceType>



Expand Down Expand Up @@ -2983,6 +3080,13 @@



<UAReferenceType NodeId="i=14476" BrowseName="HasPubSubConnection">
<DisplayName>HasPubSubConnection</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=47</Reference>
</References>
<InverseName>PubSubConnectionOf</InverseName>
</UAReferenceType>



Expand All @@ -3006,6 +3110,13 @@



<UAReferenceType NodeId="i=14936" BrowseName="DataSetToWriter">
<DisplayName>DataSetToWriter</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=33</Reference>
</References>
<InverseName>WriterToDataSet</InverseName>
</UAReferenceType>



Expand Down Expand Up @@ -3224,6 +3335,13 @@



<UAReferenceType NodeId="i=15296" BrowseName="HasDataSetWriter">
<DisplayName>HasDataSetWriter</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=47</Reference>
</References>
<InverseName>IsWriterInGroup</InverseName>
</UAReferenceType>



Expand Down Expand Up @@ -3293,23 +3411,13 @@




















<UAReferenceType NodeId="i=15297" BrowseName="HasDataSetReader">
<DisplayName>HasDataSetReader</DisplayName>
<References>
<Reference ReferenceType="HasSubtype" IsForward="false">i=47</Reference>
</References>
<InverseName>IsReaderInGroup</InverseName>
</UAReferenceType>



Expand Down
2 changes: 1 addition & 1 deletion lib/opcua/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def nodes
end

def import_ua
add_nodeset File.read(File.join(File.dirname(__FILE__), "Opc.Ua.tiny.NodeSet2.xml"))
add_nodeset File.read(File.join(File.dirname(__FILE__), "Opc.Ua.thin.NodeSet2.xml"))
end

def import_ua_full
Expand Down

0 comments on commit 290b060

Please sign in to comment.