Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
monticore
EmbeddedMontiArc
languages
EmbeddedMontiArc
Commits
13a9ba16
Commit
13a9ba16
authored
Jun 20, 2019
by
Mike Grüne
Browse files
Edited MqttConnectionSymbol
parent
4b51070e
Pipeline
#151853
failed with stage
in 1 minute and 38 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/monticore/lang/embeddedmontiarc/tagging/middleware/mqtt/MqttConnectionSymbol.java
View file @
13a9ba16
...
...
@@ -10,53 +10,69 @@ public class MqttConnectionSymbol extends MiddlewareSymbol {
public
static
final
MqttConnectionKind
KIND
=
MqttConnectionKind
.
INSTANCE
;
public
MqttConnectionSymbol
()
{
super
(
KIND
,
Optional
.
empty
(),
Optional
.
empty
(),
Optional
.
empty
());
super
(
KIND
,
Optional
.
empty
(),
Optional
.
empty
(),
Optional
.
empty
(),
Optional
.
empty
());
}
public
MqttConnectionSymbol
(
String
topicName
,
String
topic
Typ
e
)
{
this
(
KIND
,
topicName
,
topicType
);
public
MqttConnectionSymbol
(
String
id
,
String
topic
Nam
e
)
{
this
(
KIND
,
id
,
topicName
);
}
public
MqttConnectionSymbol
(
MqttConnectionKind
kind
,
String
topicName
,
String
topic
Typ
e
)
{
super
(
kind
,
Optional
.
ofNullable
(
topicName
),
Optional
.
ofNullable
(
topic
Typ
e
),
Optional
.
empty
());
public
MqttConnectionSymbol
(
MqttConnectionKind
kind
,
String
id
,
String
topic
Nam
e
)
{
super
(
kind
,
Optional
.
ofNullable
(
id
),
Optional
.
ofNullable
(
topic
Nam
e
),
Optional
.
empty
());
}
public
MqttConnectionSymbol
(
String
topicName
,
String
topic
Type
,
String
msgField
)
{
this
(
KIND
,
topicName
,
topicType
,
msgField
);
public
MqttConnectionSymbol
(
String
id
,
String
topic
Name
,
int
qoS
)
{
this
(
KIND
,
id
,
topicName
,
qoS
);
}
protected
MqttConnectionSymbol
(
MqttConnectionKind
kind
,
String
topicName
,
String
topicType
,
String
msgField
)
{
super
(
kind
,
Optional
.
ofNullable
(
topicName
),
Optional
.
ofNullable
(
topicType
),
Optional
.
ofNullable
(
msgField
));
public
MqttConnectionSymbol
(
MqttConnectionKind
kind
,
String
id
,
String
topicName
,
int
qoS
){
super
(
kind
,
Optional
.
ofNullable
(
id
),
Optional
.
ofNullable
(
topicName
),
Optional
.
ofNullable
(
qoS
))
}
public
MqttConnectionSymbol
(
String
id
,
String
topicName
,
int
qoS
,
String
msgField
){
this
(
KIND
,
id
,
topicName
,
qoS
,
msgField
);
}
protected
MqttConnectionSymbol
(
MqttConnectionKind
kind
,
String
id
,
String
topicName
,
int
qoS
,
String
msgField
)
{
super
(
kind
,
Optional
.
ofNullable
(
id
),
Optional
.
ofNullable
(
topicName
),
Optional
.
ofNullable
(
qoS
),
Optional
.
ofNullable
(
msgField
));
}
@Override
public
String
toString
()
{
return
String
.
format
(
"MqttConnection = (%s, %
s
), %s"
,
getTopicName
(),
get
TopicType
(),
getMsgField
());
return
String
.
format
(
"MqttConnection =
%s,
(%s, %
d
), %s"
,
getId
(),
getTopicName
(),
get
QoS
(),
getMsgField
());
}
public
Optional
<
String
>
get
TopicName
()
{
public
Optional
<
String
>
get
Id
()
{
return
getValue
(
0
);
}
public
void
set
TopicName
(
String
topicName
)
{
this
.
value
s
.
set
(
0
,
Optional
.
ofNullable
(
topicName
));
public
void
set
Id
(
String
id
)
{
this
.
value
.
set
(
0
,
Optional
.
ofNullable
(
id
));
}
public
Optional
<
String
>
getTopic
Typ
e
()
{
public
Optional
<
String
>
getTopic
Nam
e
()
{
return
getValue
(
1
);
}
public
void
setTopic
Typ
e
(
String
topic
Typ
e
)
{
this
.
values
.
set
(
1
,
Optional
.
ofNullable
(
topic
Typ
e
));
public
void
setTopic
Nam
e
(
String
topic
Nam
e
)
{
this
.
values
.
set
(
1
,
Optional
.
ofNullable
(
topic
Nam
e
));
}
public
Optional
<
Str
in
g
>
get
MsgField
()
{
public
Optional
<
in
t
>
get
QoS
()
{
return
getValue
(
2
);
}
public
void
setTopicType
(
String
qoS
)
{
this
.
values
.
set
(
2
,
Optional
.
ofNullable
(
qoS
));
}
public
Optional
<
String
>
getMsgField
()
{
return
getValue
(
3
);
}
public
void
setMsgField
(
String
msgField
)
{
this
.
values
.
set
(
2
,
Optional
.
ofNullable
(
msgField
));
this
.
values
.
set
(
3
,
Optional
.
ofNullable
(
msgField
));
}
public
static
class
MqttConnectionKind
extends
TagKind
{
...
...
src/main/java/de/monticore/lang/embeddedmontiarc/tagging/middleware/mqtt/MqttSymbolCreator.java
View file @
13a9ba16
...
...
@@ -124,7 +124,7 @@ public class MqttSymbolCreator implements TagSymbolCreator {
}
Log
.
error
(
String
.
format
(
"'%s' does not match the specified regex pattern '%s'"
,
regex
,
"{topic = ({name}, {type}), msgField = {msgField}}"
));
"{
id = {name},
topic = ({name}, {type}), msgField = {msgField}}"
));
return
null
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment