-
Notifications
You must be signed in to change notification settings - Fork 15
/
server_capabilites.go
65 lines (61 loc) · 2.55 KB
/
server_capabilites.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
package ua
// ServerCapabilities contains the server capabilities.
type ServerCapabilities struct {
LocaleIDArray []string
MaxStringLength uint32
MaxArrayLength uint32
MaxByteStringLength uint32
MaxBrowseContinuationPoints uint16
MaxHistoryContinuationPoints uint16
MaxQueryContinuationPoints uint16
MinSupportedSampleRate float64
ServerProfileArray []string
OperationLimits *OperationLimits
}
// NewServerCapabilities returns a ServerCapabilities structure with default values.
func NewServerCapabilities() *ServerCapabilities {
return &ServerCapabilities{
LocaleIDArray: []string{"en"},
MaxStringLength: 4096,
MaxArrayLength: 4096,
MaxByteStringLength: 4096,
MaxBrowseContinuationPoints: 10,
MaxHistoryContinuationPoints: 100,
MaxQueryContinuationPoints: 0,
MinSupportedSampleRate: 100,
ServerProfileArray: []string{"http://opcfoundation.org/UA-Profile/Server/StandardUA2017", "http://opcfoundation.org/UAProfile/Server/Methods"},
OperationLimits: NewOperationLimits(),
}
}
// OperationLimits contains the server's operation limits.
type OperationLimits struct {
MaxNodesPerRead uint32
MaxNodesPerHistoryReadData uint32
MaxNodesPerHistoryReadEvents uint32
MaxNodesPerWrite uint32
MaxNodesPerHistoryUpdateData uint32
MaxNodesPerHistoryUpdateEvents uint32
MaxNodesPerMethodCall uint32
MaxNodesPerBrowse uint32
MaxNodesPerRegisterNodes uint32
MaxNodesPerTranslateBrowsePathsToNodeIds uint32
MaxNodesPerNodeManagement uint32
MaxMonitoredItemsPerCall uint32
}
// NewOperationLimits returns a OperationLimits structure with default values.
func NewOperationLimits() *OperationLimits {
return &OperationLimits{
MaxNodesPerRead: 1000,
MaxNodesPerHistoryReadData: 1000,
MaxNodesPerHistoryReadEvents: 1000,
MaxNodesPerWrite: 1000,
MaxNodesPerHistoryUpdateData: 1000,
MaxNodesPerHistoryUpdateEvents: 1000,
MaxNodesPerMethodCall: 1000,
MaxNodesPerBrowse: 1000,
MaxNodesPerRegisterNodes: 1000,
MaxNodesPerTranslateBrowsePathsToNodeIds: 1000,
MaxNodesPerNodeManagement: 1000,
MaxMonitoredItemsPerCall: 1000,
}
}