Skip to content

Commit

Permalink
[ADD] omron fins tcp protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
rooterWzs committed Jan 7, 2025
1 parent 794156a commit e8510a6
Show file tree
Hide file tree
Showing 73 changed files with 11,872 additions and 299 deletions.
8 changes: 8 additions & 0 deletions plc4j/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -814,9 +814,20 @@ public enum KnxManufacturer {
(int) 697, (int) 755, (String) "Maxtreen building technology co.,ltd"),
M_HYSINE((int) 698, (int) 756, (String) "Hysine"),
M_SANTAN((int) 699, (int) 757, (String) "SANTAN"),
M_ABB___RESERVED((int) 700, (int) 43954, (String) "ABB - reserved"),
M_HUIXIANGJU_IOT_TECHNOLOGY_SHANGHAI_CO___LTD(
(int) 700, (int) 758, (String) "Huixiangju IoT Technology (Shanghai) Co., Ltd"),
M_SHANGHAI_BENKONG_ELECTRONIC_TECHNOLOGY_CO__LTD(
(int) 701, (int) 759, (String) "Shanghai Benkong Electronic Technology Co.,Ltd"),
M_POLAR_BEAR_DESIGN((int) 702, (int) 760, (String) "Polar Bear Design"),
M_ELESSAN_NV((int) 703, (int) 761, (String) "Elessan NV"),
M_MIR((int) 704, (int) 762, (String) "MIR"),
M_ZHEJIANG_MISILIN_TECHNOLOGY_CO___LTD(
(int) 705, (int) 763, (String) "Zhejiang Misilin Technology Co., Ltd"),
M_LEAX_CONTROLS_CO___LTD_((int) 706, (int) 764, (String) "LEAX CONTROLS CO., LTD."),
M_ALCAD((int) 707, (int) 765, (String) "alcad"),
M_ABB___RESERVED((int) 708, (int) 43954, (String) "ABB - reserved"),
M_BUSCH_JAEGER_ELEKTRO___RESERVED(
(int) 701, (int) 43959, (String) "Busch-Jaeger Elektro - reserved");
(int) 709, (int) 43959, (String) "Busch-Jaeger Elektro - reserved");
private static final Map<Integer, KnxManufacturer> map;

static {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.plc4x.java.opcua.readwrite;

import static org.apache.plc4x.java.spi.codegen.fields.FieldReaderFactory.*;
import static org.apache.plc4x.java.spi.codegen.fields.FieldWriterFactory.*;
import static org.apache.plc4x.java.spi.codegen.io.DataReaderFactory.*;
import static org.apache.plc4x.java.spi.codegen.io.DataWriterFactory.*;
import static org.apache.plc4x.java.spi.generation.StaticHelper.*;

import java.time.*;
import java.util.*;
import org.apache.plc4x.java.api.exceptions.*;
import org.apache.plc4x.java.api.value.*;
import org.apache.plc4x.java.spi.codegen.*;
import org.apache.plc4x.java.spi.codegen.fields.*;
import org.apache.plc4x.java.spi.codegen.io.*;
import org.apache.plc4x.java.spi.generation.*;

// Code generated by code-generation. DO NOT EDIT.

public class ActionMethodDataType extends ExtensionObjectDefinition implements Message {

// Accessors for discriminator values.
public Integer getExtensionId() {
return (int) 18599;
}

// Properties.
protected final NodeId objectId;
protected final NodeId methodId;

public ActionMethodDataType(NodeId objectId, NodeId methodId) {
super();
this.objectId = objectId;
this.methodId = methodId;
}

public NodeId getObjectId() {
return objectId;
}

public NodeId getMethodId() {
return methodId;
}

@Override
protected void serializeExtensionObjectDefinitionChild(WriteBuffer writeBuffer)
throws SerializationException {
PositionAware positionAware = writeBuffer;
boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get();
writeBuffer.pushContext("ActionMethodDataType");

// Simple Field (objectId)
writeSimpleField("objectId", objectId, writeComplex(writeBuffer));

// Simple Field (methodId)
writeSimpleField("methodId", methodId, writeComplex(writeBuffer));

writeBuffer.popContext("ActionMethodDataType");
}

@Override
public int getLengthInBytes() {
return (int) Math.ceil((float) getLengthInBits() / 8.0);
}

@Override
public int getLengthInBits() {
int lengthInBits = super.getLengthInBits();
ActionMethodDataType _value = this;
boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get();

// Simple field (objectId)
lengthInBits += objectId.getLengthInBits();

// Simple field (methodId)
lengthInBits += methodId.getLengthInBits();

return lengthInBits;
}

public static ExtensionObjectDefinitionBuilder staticParseExtensionObjectDefinitionBuilder(
ReadBuffer readBuffer, Integer extensionId) throws ParseException {
readBuffer.pullContext("ActionMethodDataType");
PositionAware positionAware = readBuffer;
boolean _lastItem = ThreadLocalHelper.lastItemThreadLocal.get();

NodeId objectId =
readSimpleField("objectId", readComplex(() -> NodeId.staticParse(readBuffer), readBuffer));

NodeId methodId =
readSimpleField("methodId", readComplex(() -> NodeId.staticParse(readBuffer), readBuffer));

readBuffer.closeContext("ActionMethodDataType");
// Create the instance
return new ActionMethodDataTypeBuilderImpl(objectId, methodId);
}

public static class ActionMethodDataTypeBuilderImpl
implements ExtensionObjectDefinition.ExtensionObjectDefinitionBuilder {
private final NodeId objectId;
private final NodeId methodId;

public ActionMethodDataTypeBuilderImpl(NodeId objectId, NodeId methodId) {
this.objectId = objectId;
this.methodId = methodId;
}

public ActionMethodDataType build() {
ActionMethodDataType actionMethodDataType = new ActionMethodDataType(objectId, methodId);
return actionMethodDataType;
}
}

@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ActionMethodDataType)) {
return false;
}
ActionMethodDataType that = (ActionMethodDataType) o;
return (getObjectId() == that.getObjectId())
&& (getMethodId() == that.getMethodId())
&& super.equals(that)
&& true;
}

@Override
public int hashCode() {
return Objects.hash(super.hashCode(), getObjectId(), getMethodId());
}

@Override
public String toString() {
WriteBufferBoxBased writeBufferBoxBased = new WriteBufferBoxBased(true, true);
try {
writeBufferBoxBased.writeSerializable(this);
} catch (SerializationException e) {
throw new RuntimeException(e);
}
return "\n" + writeBufferBoxBased.getBox().toString() + "\n";
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.plc4x.java.opcua.readwrite;

import java.util.HashMap;
import java.util.Map;

// Code generated by code-generation. DO NOT EDIT.

public enum ActionState {
actionStateIdle((long) 0L),
actionStateExecuting((long) 1L),
actionStateDone((long) 2L);
private static final Map<Long, ActionState> map;

static {
map = new HashMap<>();
for (ActionState value : ActionState.values()) {
map.put((long) value.getValue(), value);
}
}

private final long value;

ActionState(long value) {
this.value = value;
}

public long getValue() {
return value;
}

public static ActionState enumForValue(long value) {
return map.get(value);
}

public static Boolean isDefined(long value) {
return map.containsKey(value);
}
}
Loading

0 comments on commit e8510a6

Please sign in to comment.