Hi Dale,
I was also thinking about how we could make this easier. I think this is also a
general problem we probably have solve in the "normal API" too.
While working on some Jackson Yaml parsing code, I thought that it might be an
option to create Pojo classes with properties, that are annotated with
PlcAnnotations that provide the Addresses in the PLC. The downside of this
approach would be that this way the address string is hard-coded inside the
program.
An Alternative would be to have an additional annotation with a property name.
Then we could provide the type as well as a "Propteries" object that is passed
to the API.
@PlcAnnotation("INPUTS/1.0")
private byte myProperty;
or
@PlcAnnotation("some.property.id")
private byte myProperty;
Then the adapters could extract the name and the addresses from the pojo class
itself and hereby greatly reduce the code needed to create a request.
What do you think?
Chris
Am 03.02.18, 15:32 schrieb "Dale LaBossiere" <[email protected]>:
When do we need it? I know the sooner the better :-)
My month is a bit hectic (retirement planning, wrapping up @ IBM, taking
vacation days, etc :-)
I’ve got to see where the plc API is now with respect to the objects and
interactions for batch reads.
But I expect adding a new fn like:
static plc-batch-read-response-object
batchSupplier(PlcConnectionAdapter, plc-batch-read-request-object)
And probably want a fn that converts a batch-read-response-object to JSON
so that it can then be published to Kafka/Elastic. That to-JSON utility fn
seems like something that could/should be added to the plc API if one doesn’t
already exist.
The real work is in PlcConnectionAdapter. A new package level method
plc-read-request-object newSupplier(plc-read-request-object)
Doesn’t seem like it should be too much work :-)
— Dale
> On Feb 1, 2018, at 11:26 AM, Christofer Dutz <[email protected]>
wrote:
>
> Hi all and hopefully Dale,
>
> I have spent quite some time travelling and talking to people in the
industry in the past few weeks. The interest in our Project and Apache Edgent
is huge.
>
> Now the use-case that I was asked about most, is to read multiple values
in one request and to push that to somewhere (Usually Kafka or Elastic). Well
guess they see PLC4X as a replacement for what they do now, guess it will take
some time till they come up with more challenging requests ;-)
>
> Right now the Edgent integration supports reading of single addresses.
How would this look if we wanted to allow reading of a set of different
addresses? Guess the result would probably be some sort of map-stream … do you
have any idea how this should look like?
>
> If you had some time (maybe some a bad weather day down in Florida … or
the Ultra Music festival is so loud that you don’t want to leave your house ;-)
) where you could give this feature a thought or two?
>
> Chris