Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ind2uce
core
Commits
fbb2a21c
Commit
fbb2a21c
authored
Feb 26, 2018
by
Raj Shah
Browse files
Release 3.2.51
parent
7f5e9d2c
Changes
127
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/fraunhofer/iese/ind2uce/logger/AndroidLogger.java
View file @
fbb2a21c
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
@@ -75,11 +75,6 @@ public class AndroidLogger implements Logger {
...
@@ -75,11 +75,6 @@ public class AndroidLogger implements Logger {
*/
*/
private
static
final
int
OFF_LEVEL
=
Integer
.
MAX_VALUE
;
private
static
final
int
OFF_LEVEL
=
Integer
.
MAX_VALUE
;
/**
* The Constant PLACEHOLDER.
*/
private
static
final
String
PLACEHOLDER
=
"\\{\\}"
;
/**
/**
* The name.
* The name.
*/
*/
...
@@ -88,7 +83,7 @@ public class AndroidLogger implements Logger {
...
@@ -88,7 +83,7 @@ public class AndroidLogger implements Logger {
/**
/**
* The android logger.
* The android logger.
*/
*/
private
Class
<?>
androidLogger
;
private
Class
<?>
androidLogger
Class
;
/**
/**
* The trace.
* The trace.
...
@@ -130,15 +125,15 @@ public class AndroidLogger implements Logger {
...
@@ -130,15 +125,15 @@ public class AndroidLogger implements Logger {
this
.
name
=
name
;
this
.
name
=
name
;
this
.
logLevel
=
logLevel
;
this
.
logLevel
=
logLevel
;
try
{
try
{
this
.
androidLogger
=
Class
.
forName
(
"android.util.Log"
);
this
.
androidLogger
Class
=
Class
.
forName
(
"android.util.Log"
);
this
.
trace
=
this
.
androidLogger
.
getMethod
(
"v"
,
String
.
class
,
String
.
class
);
this
.
trace
=
this
.
androidLogger
Class
.
getMethod
(
"v"
,
String
.
class
,
String
.
class
);
this
.
debug
=
this
.
androidLogger
.
getMethod
(
"d"
,
String
.
class
,
String
.
class
);
this
.
debug
=
this
.
androidLogger
Class
.
getMethod
(
"d"
,
String
.
class
,
String
.
class
);
this
.
info
=
this
.
androidLogger
.
getMethod
(
"i"
,
String
.
class
,
String
.
class
);
this
.
info
=
this
.
androidLogger
Class
.
getMethod
(
"i"
,
String
.
class
,
String
.
class
);
this
.
warn
=
this
.
androidLogger
.
getMethod
(
"w"
,
String
.
class
,
String
.
class
);
this
.
warn
=
this
.
androidLogger
Class
.
getMethod
(
"w"
,
String
.
class
,
String
.
class
);
this
.
error
=
this
.
androidLogger
.
getMethod
(
"e"
,
String
.
class
,
String
.
class
);
this
.
error
=
this
.
androidLogger
Class
.
getMethod
(
"e"
,
String
.
class
,
String
.
class
);
}
catch
(
ClassNotFoundException
|
NoSuchMethodException
|
SecurityException
|
IllegalArgumentException
e
)
{
}
catch
(
ClassNotFoundException
|
NoSuchMethodException
|
SecurityException
|
IllegalArgumentException
e
)
{
System
.
err
.
println
(
"androidLoggerClass not found!"
);
System
.
err
.
println
(
"androidLoggerClass not found!"
);
// NOSONAR
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -149,11 +144,7 @@ public class AndroidLogger implements Logger {
...
@@ -149,11 +144,7 @@ public class AndroidLogger implements Logger {
* @return true, if successful
* @return true, if successful
*/
*/
private
boolean
checkLogLevel
(
LogLevel
logLevel
)
{
private
boolean
checkLogLevel
(
LogLevel
logLevel
)
{
if
(
this
.
getLogLevelValue
(
this
.
logLevel
)
<=
this
.
getLogLevelValue
(
logLevel
))
{
return
(
this
.
getLogLevelValue
(
this
.
logLevel
)
<=
this
.
getLogLevelValue
(
logLevel
));
return
true
;
}
else
{
return
false
;
}
}
}
/*
/*
...
@@ -165,7 +156,7 @@ public class AndroidLogger implements Logger {
...
@@ -165,7 +156,7 @@ public class AndroidLogger implements Logger {
try
{
try
{
this
.
debug
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
debug
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -221,7 +212,7 @@ public class AndroidLogger implements Logger {
...
@@ -221,7 +212,7 @@ public class AndroidLogger implements Logger {
this
.
debug
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
debug
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
}
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -271,7 +262,7 @@ public class AndroidLogger implements Logger {
...
@@ -271,7 +262,7 @@ public class AndroidLogger implements Logger {
try
{
try
{
this
.
error
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
error
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -327,7 +318,7 @@ public class AndroidLogger implements Logger {
...
@@ -327,7 +318,7 @@ public class AndroidLogger implements Logger {
this
.
error
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
error
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
}
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -420,7 +411,7 @@ public class AndroidLogger implements Logger {
...
@@ -420,7 +411,7 @@ public class AndroidLogger implements Logger {
try
{
try
{
this
.
info
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
info
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -476,7 +467,7 @@ public class AndroidLogger implements Logger {
...
@@ -476,7 +467,7 @@ public class AndroidLogger implements Logger {
this
.
info
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
info
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
}
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -652,7 +643,7 @@ public class AndroidLogger implements Logger {
...
@@ -652,7 +643,7 @@ public class AndroidLogger implements Logger {
try
{
try
{
this
.
trace
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
trace
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -708,7 +699,7 @@ public class AndroidLogger implements Logger {
...
@@ -708,7 +699,7 @@ public class AndroidLogger implements Logger {
this
.
trace
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
trace
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
}
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -758,7 +749,7 @@ public class AndroidLogger implements Logger {
...
@@ -758,7 +749,7 @@ public class AndroidLogger implements Logger {
try
{
try
{
this
.
warn
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
warn
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
@@ -814,7 +805,7 @@ public class AndroidLogger implements Logger {
...
@@ -814,7 +805,7 @@ public class AndroidLogger implements Logger {
this
.
warn
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
this
.
warn
.
invoke
(
null
,
this
.
shortenName
(
this
.
name
),
msg
);
}
}
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
}
}
...
...
src/main/java/de/fraunhofer/iese/ind2uce/logger/LoggerFactory.java
View file @
fbb2a21c
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
@@ -88,7 +88,7 @@ public class LoggerFactory {
...
@@ -88,7 +88,7 @@ public class LoggerFactory {
/**
/**
* The used logger.
* The used logger.
*/
*/
p
ublic
static
LoggerFramework
usedLogger
=
LoggerFramework
.
LOGBACK
;
p
rivate
static
LoggerFramework
usedLogger
=
LoggerFramework
.
LOGBACK
;
/**
/**
* The current log level.
* The current log level.
...
@@ -127,7 +127,7 @@ public class LoggerFactory {
...
@@ -127,7 +127,7 @@ public class LoggerFactory {
}
}
}
catch
(
ClassNotFoundException
|
NoSuchMethodException
|
SecurityException
|
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
}
catch
(
ClassNotFoundException
|
NoSuchMethodException
|
SecurityException
|
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
try
{
try
{
...
@@ -138,7 +138,7 @@ public class LoggerFactory {
...
@@ -138,7 +138,7 @@ public class LoggerFactory {
return
androidLogger
;
return
androidLogger
;
}
catch
(
ClassNotFoundException
|
SecurityException
|
IllegalArgumentException
e
)
{
}
catch
(
ClassNotFoundException
|
SecurityException
|
IllegalArgumentException
e
)
{
// do nothing on purpose
// do nothing on purpose
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
}
}
LoggerFactory
.
usedLogger
=
LoggerFramework
.
STDOUT
;
LoggerFactory
.
usedLogger
=
LoggerFramework
.
STDOUT
;
...
@@ -193,11 +193,11 @@ public class LoggerFactory {
...
@@ -193,11 +193,11 @@ public class LoggerFactory {
break
;
break
;
}
}
}
catch
(
ClassNotFoundException
|
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
|
NoSuchMethodException
|
SecurityException
e
)
{
}
catch
(
ClassNotFoundException
|
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
|
NoSuchMethodException
|
SecurityException
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
// NOSONAR
return
false
;
return
false
;
}
}
}
else
{
}
else
{
System
.
err
.
println
(
"LoggerFramework not supported"
);
System
.
err
.
println
(
"LoggerFramework not supported"
);
// NOSONAR
return
false
;
return
false
;
}
}
return
true
;
return
true
;
...
...
src/main/java/de/fraunhofer/iese/ind2uce/logger/SysoutLogger.java
View file @
fbb2a21c
...
@@ -7,9 +7,9 @@
...
@@ -7,9 +7,9 @@
* Licensed under the Apache License, Version 2.0 (the "License");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing, software
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
@@ -463,7 +463,7 @@ public class SysoutLogger implements Logger {
...
@@ -463,7 +463,7 @@ public class SysoutLogger implements Logger {
public
void
log
(
LogLevel
level
,
String
msg
)
{
public
void
log
(
LogLevel
level
,
String
msg
)
{
final
DateFormat
dateFormat
=
new
SimpleDateFormat
(
"dd.MM.YYYY HH:mm:ss"
);
final
DateFormat
dateFormat
=
new
SimpleDateFormat
(
"dd.MM.YYYY HH:mm:ss"
);
final
Date
date
=
new
Date
();
final
Date
date
=
new
Date
();
System
.
out
.
println
(
"["
+
dateFormat
.
format
(
date
)
+
"]["
+
this
.
name
+
"]["
+
String
.
format
(
"%5s"
,
level
)
+
"] "
+
msg
);
System
.
out
.
println
(
"["
+
dateFormat
.
format
(
date
)
+
"]["
+
this
.
name
+
"]["
+
String
.
format
(
"%5s"
,
level
)
+
"] "
+
msg
);
// NOSONAR
}
}
/**
/**
...
...
src/main/resources/IntegratedDemonstrator_5.xml
0 → 100644
View file @
fbb2a21c
<policy
xmlns=
"http://www.iese.fhg.de/ind2uce/1.0/enforcementLanguage"
xmlns:tns=
"http://www.iese.fhg.de/ind2uce/1.0/enforcementLanguage"
xmlns:a=
"http://www.iese.fhg.de/ind2uce/1.0/action"
xmlns:e=
"http://www.iese.fhg.de/ind2uce/1.0/event"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://www.iese.fhg.de/ind2uce/1.0/enforcementLanguage
enforcementLanguage-FhG.xsd http://www.iese.fhg.de/ind2uce/1.0/action action-FhG.xsd http://www.iese.fhg.de/ind2uce/1.0/event
event-FhG.xsd http://www.master-fp7.eu/mcalculus.xsd mcalculus.xsd"
description=
"description"
name=
"FireAlarm"
>
<preventiveMechanism
name=
"ACPfire_23115018"
>
<timestep
amount=
"3"
unit=
"SECONDS"
/>
<trigger
action=
"SmartIntegoMessage"
isTry=
"false"
>
<paramMatch
name=
"msgType"
value=
"14"
/>
</trigger>
<condition>
<within
amount=
"7"
unit=
"SECONDS"
>
<eventMatch
action=
"EnoceanTelegram"
>
<paramMatch
name=
"RadioTelegram"
value=
"true"
/>
<paramMatch
name=
"RPS"
value=
"true"
/>
<paramMatch
name=
"RORG"
value=
"f6"
/>
<paramMatch
name=
"ID"
value=
"180080e"
/>
<paramMatch
name=
"data"
value=
"30"
/>
</eventMatch>
</within>
</condition>
<authorizationAction
name=
"default"
>
<allow>
<executeAction
name=
"SmartIntegoAction"
>
<parameter
name=
"action"
value=
"ShortTermActivation"
/>
<parameter
name=
"duration"
value=
"1"
/>
</executeAction>
</allow>
</authorizationAction>
</preventiveMechanism>
<preventiveMechanism
name=
"Enocean_20395081"
>
<timestep
amount=
"30000"
unit=
"SECONDS"
/>
<trigger
action=
"EnoceanTelegram"
isTry=
"false"
>
<paramMatch
name=
"RadioTelegram"
value=
"true"
/>
<paramMatch
name=
"RPS"
value=
"true"
/>
<paramMatch
name=
"RORG"
value=
"f6"
/>
<paramMatch
name=
"ID"
value=
"180080e"
/>
<paramMatch
name=
"data"
value=
"30"
/>
</trigger>
<condition>
<true
/>
</condition>
<authorizationAction
name=
"default"
>
<allow>
<executeAction
name=
"EnoceanAction"
>
<parameter
name=
"action"
value=
"ToggleSwitch"
/>
<parameter
name=
"destination"
value=
"0x01038be3"
/>
<parameter
name=
"switchOn"
value=
"true"
/>
</executeAction>
<executeAction
name=
"NestAlarmSender"
>
<parameter
name=
"type"
value=
"fire"
/>
</executeAction>
</allow>
</authorizationAction>
</preventiveMechanism>
<detectiveMechanism
name=
"EnoceanDeactivate_59495885"
>
<timestep
amount=
"3"
unit=
"SECONDS"
/>
<condition>
<before
amount=
"8"
unit=
"MINUTES"
>
<eventMatch
action=
"EnoceanTelegram"
>
<paramMatch
name=
"RadioTelegram"
value=
"true"
/>
<paramMatch
name=
"RPS"
value=
"true"
/>
<paramMatch
name=
"RORG"
value=
"f6"
/>
<paramMatch
name=
"ID"
value=
"180080e"
/>
<paramMatch
name=
"data"
value=
"30"
/>
</eventMatch>
</before>
</condition>
<executeAction
name=
"EnoceanAction"
>
<parameter
name=
"action"
value=
"ToggleSwitch"
/>
<parameter
name=
"destination"
value=
"0x01038be3"
/>
<parameter
name=
"switchOn"
value=
"false"
/>
</executeAction>
</detectiveMechanism>
</policy>
\ No newline at end of file
src/main/resources/IntegratedDemonstrator_5_new.xml
0 → 100644
View file @
fbb2a21c
<policy
id=
"urn:policy:b0:FireAlarm"
name=
"FireAlarm"
description=
""
xmlns=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/ind2uceLanguage"
xmlns:tns=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/ind2uceLanguage"
xmlns:parameter=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/parameter"
xmlns:pip=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/pip"
xmlns:function=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/function"
xmlns:event=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/event"
xmlns:constant=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/constant"
xmlns:variable=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/variable"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
>
<!-- <timer cron="*/3 * * * * *"> -->
<!-- <fireEvent action="urn:action:b0:blubb" /> -->
<!-- </timer> -->
<mechanism
event=
"urn:action:b0:SmartIntegoMessage"
>
<if>
<and>
<equals>
<event:number
eventParameter=
"msgType"
default=
"0"
/>
<constant:number
value=
"14"
/>
</equals>
<greaterEqual>
<count>
<eventOccurrence
event=
"urn:action:b0:EnoceanTelegram"
>
<parameter:boolean
name=
"RadioTelegram"
value=
"true"
/>
<parameter:boolean
name=
"RPS"
value=
"true"
/>
<parameter:string
name=
"RORG"
value=
"f6"
/>
<parameter:string
name=
"ID"
value=
"180080e"
/>
<parameter:string
name=
"data"
value=
"30"
/>
</eventOccurrence>
<start
time=
"*.*.* *:*:-7"
/>
</count>
<constant:number
value=
"1"
/>
</greaterEqual>
</and>
<then>
<execute
action=
"urn:action:b0:SmartIntegoAction"
>
<parameter:string
name=
"action"
value=
"ShortTermActivation"
/>
<parameter:number
name=
"duration"
value=
"1"
/>
</execute>
</then>
</if>
</mechanism>
<mechanism
event=
"urn:action:b0:EnoceanTelegram"
>
<if>
<and>
<event:boolean
eventParameter=
"RadioTelegram"
default=
"false"
/>
<event:boolean
eventParameter=
"RPS"
default=
"false"
/>
<equals>
<event:string
eventParameter=
"RORG"
default=
""
/>
<constant:string
value=
"f6"
/>
</equals>
<equals>
<event:string
eventParameter=
"ID"
default=
""
/>
<constant:string
value=
"180080e"
/>
</equals>
<equals>
<event:string
eventParameter=
"data"
default=
""
/>
<constant:string
value=
"30"
/>
</equals>
</and>
<then>
<execute
action=
"urn:action:b0:EnoceanAction"
>
<parameter:string
name=
"action"
value=
"ToggleSwitch"
/>
<parameter:string
name=
"destination"
value=
"0x01038be3"
/>
<parameter:string
name=
"switchOn"
value=
"true"
/>
</execute>
<execute
action=
"urn:action:b0:NestAlarmSender"
>
<parameter:string
name=
"type"
value=
"fire"
/>
</execute>
</then>
</if>
</mechanism>
<mechanism
event=
"urn:action:b0:blubb"
>
<if>
<greaterEqual>
<count>
<eventOccurrence
event=
"urn:action:b0:EnoceanTelegram"
>
<parameter:boolean
name=
"RadioTelegram"
value=
"true"
/>
<parameter:boolean
name=
"RPS"
value=
"true"
/>
<parameter:string
name=
"RORG"
value=
"f6"
/>
<parameter:string
name=
"ID"
value=
"180080e"
/>
<parameter:string
name=
"data"
value=
"30"
/>
</eventOccurrence>
<start
time=
"*.*.* *:-8:*"
/>
<end
time=
"*.*.* *:-8:*"
/>
</count>
<constant:number
value=
"1"
/>
</greaterEqual>
<then>
<execute
action=
"urn:action:b0:EnoceanAction"
>
<parameter:string
name=
"action"
value=
"ToggleSwitch"
/>
<parameter:string
name=
"destination"
value=
"0x01038be3"
/>
<parameter:boolean
name=
"switchOn"
value=
"false"
/>
</execute>
</then>
</if>
</mechanism>
</policy>
\ No newline at end of file
src/main/resources/languageSchema3_2/ind2uceConstant.xsd
0 → 100644
View file @
fbb2a21c
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/constant"
xmlns:tns=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/constant"
elementFormDefault=
"qualified"
>
<complexType
name=
"ConstantStringType"
>
<attribute
name=
"value"
type=
"string"
use=
"required"
/>
</complexType>
<complexType
name=
"ConstantNumberType"
>
<attribute
name=
"value"
type=
"double"
use=
"required"
/>
</complexType>
<complexType
name=
"ConstantListType"
>
<attribute
name=
"value"
use=
"required"
>
<simpleType>
<restriction
base=
"string"
>
<!-- comma seperated array, e.g., [1,2.0,'adf'] String in '', floating point with x.y -->
<pattern
value=
"\[([0-9](\.([0-9])+){0,1}|"[A-Za-z0-9()+,-.=@;$_!*]*")(\s*,\s*([0-9](\.([0-9])+){0,1}|"[A-Za-z0-9()+,-.=@;$_!*]*")+)*\]|\[\]"
></pattern>
</restriction>
</simpleType>
</attribute>
</complexType>
<element
name=
"string"
type=
"tns:ConstantStringType"
/>
<element
name=
"number"
type=
"tns:ConstantNumberType"
/>
<element
name=
"object"
type=
"tns:ConstantStringType"
/>
<element
name=
"list"
type=
"tns:ConstantListType"
/>
<element
name=
"true"
/>
<element
name=
"false"
/>
<group
name=
"ConstantGroup"
>
<choice>
<element
ref=
"tns:string"
/>
<element
ref=
"tns:number"
/>
<element
ref=
"tns:object"
/>
<element
ref=
"tns:list"
/>
<element
ref=
"tns:true"
/>
<element
ref=
"tns:false"
/>
</choice>
</group>
</schema>
src/main/resources/languageSchema3_2/ind2uceEvent.xsd
0 → 100644
View file @
fbb2a21c
<?xml version="1.0" encoding="UTF-8"?>
<schema
xmlns=
"http://www.w3.org/2001/XMLSchema"
targetNamespace=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/event"
xmlns:tns=
"http://www.iese.fraunhofer.de/ind2uce/3.2.46/event"
elementFormDefault=
"qualified"
>
<complexType
name=
"EventStringType"
>
<attribute
name=
"eventParameter"
type=
"string"
use=
"required"
/>
<attribute
name=
"default"
type=
"string"
use=
"required"
/>
<attribute
name=
"jsonPathQuery"
type=
"string"
use=
"optional"
/>
</complexType>
<complexType
name=
"EventBoolType"
>
<attribute
name=
"eventParameter"
type=
"string"
use=
"required"
/>
<attribute
name=
"default"
type=
"boolean"
use=
"required"
/>
<attribute
name=
"jsonPathQuery"
type=
"string"
use=
"optional"
/>
</complexType>
<complexType
name=
"EventNumberType"
>
<attribute
name=
"eventParameter"
type=
"string"
use=
"required"
/>
<attribute
name=
"default"
type=
"double"
use=
"required"
/>
<attribute
name=
"jsonPathQuery"
type=
"string"
use=
"optional"
/>
</complexType>
<complexType
name=
"EventObjectType"
>
<attribute
name=
"eventParameter"
type=
"string"
use=
"required"
/>
<attribute
name=
"default"
type=
"string"
use=
"required"
/>
<attribute
name=
"jsonPathQuery"
type=
"string"
use=
"optional"
/>
</complexType>
<complexType
name=
"EventListType"
>
<attribute
name=
"eventParameter"
type=
"string"
use=
"required"
/>
<attribute
name=