Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

about build Secs2 Message quesion #7

Closed
skay0424 opened this issue Nov 18, 2021 · 2 comments
Closed

about build Secs2 Message quesion #7

skay0424 opened this issue Nov 18, 2021 · 2 comments

Comments

@skay0424
Copy link

eg : Secs2.list(
Secs2.uint2(portListRptId), //DATAID
Secs2.uint4(eventId),
Secs2.list( //L:a
Secs2.list( //L:2
Secs2.uint4(portListRptId), //rptId
Secs2.list( //L:b
/*
V
*/
Secs2.ascii(agvCode), // agvCode
Secs2.list(
Secs2.ascii(ports.get(0)), //port1
Secs2.ascii(ports.get(1)) // port2
)
)
)
)

        );

the params port1 and port2 is List, it maybe one or more ,how do i build him, does it support foreach

@kenta-shimizu
Copy link
Owner

Hi,
interface Secs2 has
static #list(List<? extends Secs2> values);

/* build Port List from String to Secs2 example */
List<String> ports = Arrays.asList("P1", "P2");
List<Secs2> ss = ports.stream().map(Secs2::ascii).collect(Collectors.toList());
Secs2 portList = Secs2.list(ss);

@skay0424
Copy link
Author

Hi, interface Secs2 has static #list(List<? extends Secs2> values);

/* build Port List from String to Secs2 example */ List ports = Arrays.asList("P1", "P2"); List ss = ports.stream().map(Secs2::ascii).collect(Collectors.toList()); Secs2 portList = Secs2.list(ss);

Thanks very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants