Skip to content

Commit

Permalink
Updated generator/generated files
Browse files Browse the repository at this point in the history
  • Loading branch information
leonschenk committed Mar 26, 2023
1 parent edc4af1 commit b300372
Show file tree
Hide file tree
Showing 126 changed files with 12,301 additions and 12,279 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,5 @@ public boolean open(int baudRate, FlowControl flowControl) {
@Override
public void purgeRxBuffer() {
}

@Override
public void setDtr(boolean state) {
}

@Override
public void setRts(boolean state) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -202,14 +202,6 @@ public boolean open(int baudRate, FlowControl flowControl) {
public void purgeRxBuffer() {
}

@Override
public void setDtr(boolean state) {
}

@Override
public void setRts(boolean state) {
}

public byte[] getOutput() {
return Arrays.copyOfRange(output, 0, cnt);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,14 +206,6 @@ public boolean open(int baudRate, FlowControl flowControl) {
public void purgeRxBuffer() {
}

@Override
public void setDtr(boolean state) {
}

@Override
public void setRts(boolean state) {
}

public List<Integer> getOutputData() {
return outputData;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,5 @@ public boolean open(int baudRate, FlowControl flowControl) {
@Override
public void purgeRxBuffer() {
}

@Override
public void setDtr(boolean state) {
}

@Override
public void setRts(boolean state) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,6 @@ public boolean open(int baudRate, FlowControl flowControl) {
public void purgeRxBuffer() {
}

@Override
public void setDtr(boolean state) {
}

@Override
public void setRts(boolean state) {
}

public byte[] getOutput() {
return Arrays.copyOfRange(output, 0, cnt);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,13 +328,5 @@ public boolean open(int baudRate, FlowControl flowControl) {
@Override
public void purgeRxBuffer() {
}

@Override
public void setDtr(boolean state) {
}

@Override
public void setRts(boolean state) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,5 @@ public boolean open(int baudRate, FlowControl flowControl) {
@Override
public void purgeRxBuffer() {
}

@Override
public void setDtr(boolean state) {
}

@Override
public void setRts(boolean state) {
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -93,9 +94,10 @@ private void createCommandClass(String className, Command command, List<Paramete
out.println(" * <p>");
}
out.println(" * Note that this code is autogenerated. Manual changes may be overwritten.");
out.println(" *");
out.println(" * @author Chris Jackson");
out.println(" */");
out.println("");
addImport("javax.annotation.Generated");
out.println("@Generated(value = \"com.zsmartsystems.zigbee.dongle.zstack.autocode.CommandGenerator\", date = \"" + new Date() + "\")");

if (className.endsWith("Srsp") || className.endsWith("Areq")) {
addImport(zstackCommandPackage + ".ZstackFrameResponse");
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,129 +1,129 @@
/**
* Copyright (c) 2016-2022 by the respective copyright holders.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package com.zsmartsystems.zigbee.dongle.zstack.api;

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

/**
* Class to implement the Z-Stack Enumeration <b>ZstackResponseCode</b>.
* <p>
* Global response codes
* <p>
* Note that this code is autogenerated. Manual changes may be overwritten.
*
* @author Chris Jackson
*/
public enum ZstackResponseCode {
/**
* Default unknown value
*/
UNKNOWN(-1),

/**
*
*/
SUCCESS(0x0000),

/**
*
*/
FAILURE(0x0001),

/**
*
*/
AF_INVALID_PARAMETER(0x0002),

/**
* Security manager key table full
*/
AF_MEM_FAIL(0x0010),

/**
* Security manager key table full
*/
KEY_TABLE_FULL(0x0011),

/**
* The operation could not be completed because no memory resources were available
*/
MAC_NO_RESOURCES(0x001A),

/**
* Invalid Request
*/
INVALID_REQUEST(0x00C2),

/**
* Not Permitted
*/
NOT_PERMITTED(0x00C3),

/**
* Unknown Device
*/
UNKNOWN_DEVICE(0x00C8),

/**
*
*/
AF_NO_ROUTE(0x00CD),

/**
* The scan request failed because a scan is already in progress
*/
MAC_SCAN_IN_PROGRESS(0x00FC),

/**
* The outstanding transaction has expired
*/
MAC_TRANSACTION_EXPIRED(0x00F0);

/**
* A mapping between the integer code and its corresponding type to
* facilitate lookup by code.
*/
private static Map<Integer, ZstackResponseCode> codeMapping;

private int key;

static {
codeMapping = new HashMap<Integer, ZstackResponseCode>();
for (ZstackResponseCode s : values()) {
codeMapping.put(s.key, s);
}
}

private ZstackResponseCode(int key) {
this.key = key;
}

/**
* Lookup function based on the type code. Returns null if the code does not exist.
*
* @param code the code to lookup
* @return enumeration value of the alarm type.
*/
public static ZstackResponseCode valueOf(int code) {
if (codeMapping.get(code) == null) {
return UNKNOWN;
}

return codeMapping.get(code);
}

/**
* Returns the Z-Stack protocol defined value for this enumeration.
*
* @return the Z-Stack protocol key
*/
public int getKey() {
return key;
}
}
/**
* Copyright (c) 2016-2022 by the respective copyright holders.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package com.zsmartsystems.zigbee.dongle.zstack.api;

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

/**
* Class to implement the Z-Stack Enumeration <b>ZstackResponseCode</b>.
* <p>
* Global response codes
* <p>
* Note that this code is autogenerated. Manual changes may be overwritten.
*
* @author Chris Jackson
*/
public enum ZstackResponseCode {
/**
* Default unknown value
*/
UNKNOWN(-1),

/**
*
*/
SUCCESS(0x0000),

/**
*
*/
FAILURE(0x0001),

/**
*
*/
AF_INVALID_PARAMETER(0x0002),

/**
* Security manager key table full
*/
AF_MEM_FAIL(0x0010),

/**
* Security manager key table full
*/
KEY_TABLE_FULL(0x0011),

/**
* The operation could not be completed because no memory resources were available
*/
MAC_NO_RESOURCES(0x001A),

/**
* Invalid Request
*/
INVALID_REQUEST(0x00C2),

/**
* Not Permitted
*/
NOT_PERMITTED(0x00C3),

/**
* Unknown Device
*/
UNKNOWN_DEVICE(0x00C8),

/**
*
*/
AF_NO_ROUTE(0x00CD),

/**
* The scan request failed because a scan is already in progress
*/
MAC_SCAN_IN_PROGRESS(0x00FC),

/**
* The outstanding transaction has expired
*/
MAC_TRANSACTION_EXPIRED(0x00F0);

/**
* A mapping between the integer code and its corresponding type to
* facilitate lookup by code.
*/
private static Map<Integer, ZstackResponseCode> codeMapping;

private int key;

static {
codeMapping = new HashMap<Integer, ZstackResponseCode>();
for (ZstackResponseCode s : values()) {
codeMapping.put(s.key, s);
}
}

private ZstackResponseCode(int key) {
this.key = key;
}

/**
* Lookup function based on the type code. Returns null if the code does not exist.
*
* @param code the code to lookup
* @return enumeration value of the alarm type.
*/
public static ZstackResponseCode valueOf(int code) {
if (codeMapping.get(code) == null) {
return UNKNOWN;
}

return codeMapping.get(code);
}

/**
* Returns the Z-Stack protocol defined value for this enumeration.
*
* @return the Z-Stack protocol key
*/
public int getKey() {
return key;
}
}
Loading

0 comments on commit b300372

Please sign in to comment.