Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Cameo
cameo
Commits
988c6d84
Commit
988c6d84
authored
Oct 09, 2020
by
legoc
Browse files
(split) Renamed OUTPUT to OUTPUT_PORT and OUTPUT_WITH_ID to OUTPUT_PORT_WITH_ID
parent
2eff23fc
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/Server.cpp
View file @
988c6d84
...
...
@@ -129,7 +129,7 @@ std::unique_ptr<application::Instance> Server::start(const std::string& name, Op
int
Server
::
getStreamPort
(
const
std
::
string
&
name
)
{
unique_ptr
<
zmq
::
message_t
>
reply
=
m_requestSocket
->
request
(
m_impl
->
createOutputRequest
(
name
));
unique_ptr
<
zmq
::
message_t
>
reply
=
m_requestSocket
->
request
(
m_impl
->
createOutput
Port
Request
(
name
));
// Get the JSON response.
json
::
Object
response
;
...
...
src/impl/ServicesImpl.cpp
View file @
988c6d84
...
...
@@ -168,18 +168,30 @@ std::string ServicesImpl::createStreamStatusRequest() const {
return
request
.
toString
();
}
std
::
string
ServicesImpl
::
createOutputWithIdRequest
(
int
id
)
const
{
std
::
string
ServicesImpl
::
createOutput
Port
WithIdRequest
(
int
id
)
const
{
json
::
StringObject
request
;
request
.
pushKey
(
message
::
TYPE
);
request
.
pushInt
(
message
::
OUTPUT_WITH_ID
);
request
.
pushInt
(
message
::
OUTPUT_
PORT_
WITH_ID
);
request
.
pushKey
(
message
::
OutputWithIdRequest
::
ID
);
request
.
pushKey
(
message
::
Output
Port
WithIdRequest
::
ID
);
request
.
pushInt
(
id
);
return
request
.
toString
();
}
std
::
string
ServicesImpl
::
createOutputPortRequest
(
const
std
::
string
&
name
)
const
{
json
::
StringObject
request
;
request
.
pushKey
(
message
::
TYPE
);
request
.
pushInt
(
message
::
OUTPUT_PORT
);
request
.
pushKey
(
message
::
OutputPortRequest
::
NAME
);
request
.
pushString
(
name
);
return
request
.
toString
();
}
std
::
string
ServicesImpl
::
createSetStatusRequest
(
int
id
,
int32_t
state
)
const
{
json
::
StringObject
request
;
...
...
@@ -351,18 +363,6 @@ std::string ServicesImpl::createTerminatedUnmanagedRequest(int id) const {
return
request
.
toString
();
}
std
::
string
ServicesImpl
::
createOutputRequest
(
const
std
::
string
&
name
)
const
{
json
::
StringObject
request
;
request
.
pushKey
(
message
::
TYPE
);
request
.
pushInt
(
message
::
OUTPUT
);
request
.
pushKey
(
message
::
OutputRequest
::
NAME
);
request
.
pushString
(
name
);
return
request
.
toString
();
}
std
::
string
ServicesImpl
::
createRequestResponse
(
int64_t
value
)
const
{
json
::
StringObject
request
;
...
...
src/impl/ServicesImpl.h
View file @
988c6d84
...
...
@@ -56,7 +56,8 @@ public:
std
::
string
createRemovePortRequest
(
int
id
,
const
std
::
string
&
name
)
const
;
std
::
string
createStartedUnmanagedRequest
(
const
std
::
string
&
name
)
const
;
std
::
string
createTerminatedUnmanagedRequest
(
int
id
)
const
;
std
::
string
createOutputRequest
(
const
std
::
string
&
name
)
const
;
std
::
string
createOutputPortWithIdRequest
(
int
id
)
const
;
std
::
string
createOutputPortRequest
(
const
std
::
string
&
name
)
const
;
std
::
string
createRequestResponse
(
int64_t
value
)
const
;
std
::
string
createRequestResponse
(
int64_t
value
,
const
std
::
string
&
message
)
const
;
std
::
string
createStoreKeyValueRequest
(
int
id
,
const
std
::
string
&
key
,
const
std
::
string
&
value
);
...
...
@@ -68,8 +69,6 @@ public:
zmq
::
socket_t
*
createCancelPublisher
(
const
std
::
string
&
endpoint
);
zmq
::
socket_t
*
createRequestSocket
(
const
std
::
string
&
endpoint
);
std
::
string
createOutputWithIdRequest
(
int
id
)
const
;
bool
isAvailable
(
RequestSocketImpl
*
socket
,
int
timeout
);
void
waitForSubscriber
(
zmq
::
socket_t
*
subscriber
,
RequestSocketImpl
*
socket
);
...
...
src/message/Message.h
View file @
988c6d84
...
...
@@ -30,8 +30,8 @@ namespace message {
const
int
STOP
=
3
;
const
int
CONNECT
=
4
;
const
int
APPS
=
5
;
const
int
OUTPUT_WITH_ID
=
6
;
const
int
OUTPUT
=
7
;
const
int
OUTPUT_
PORT_
WITH_ID
=
6
;
const
int
OUTPUT
_PORT
=
7
;
const
int
ENABLE_STREAM
=
8
;
const
int
IS_ALIVE
=
9
;
const
int
WRITE_INPUT
=
10
;
...
...
@@ -139,11 +139,11 @@ namespace message {
constexpr
const
char
*
APPLICATION_INFO
=
"applicationInfo"
;
// repeated ApplicationInfo applicationInfo = 1;
}
namespace
OutputWithIdRequest
{
namespace
Output
Port
WithIdRequest
{
constexpr
const
char
*
ID
=
"id"
;
// required int32 id = 1;
}
namespace
OutputRequest
{
namespace
Output
Port
Request
{
constexpr
const
char
*
NAME
=
"name"
;
// required string name = 1;
}
...
...
Shervin Nourbakhsh
@nourbakhsh
mentioned in commit
46e44691
·
Apr 23, 2021
mentioned in commit
46e44691
mentioned in commit 46e44691a03808a23a464818487b0dd014a9c57e
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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