Skip to content

Commit 44f3c0d

Browse files
committed
feat: Added more return codes that can be used in new types of scenarios we didn't encounter till now.
1 parent f08bb9f commit 44f3c0d

1 file changed

Lines changed: 24 additions & 1 deletion

File tree

plc4j/api/src/main/java/org/apache/plc4x/java/api/types/PlcResponseCode.java

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,30 @@ public enum PlcResponseCode {
6666
/**
6767
* Indicates a response is pending.
6868
*/
69-
RESPONSE_PENDING((short) 0x0C);
69+
RESPONSE_PENDING((short) 0x0C),
70+
/**
71+
* The request and the connection are both healthy, but the data this
72+
* tag points at is not yet available — typically because an asynchronous
73+
* source (cyclic IO, subscription stream, lazy cache) has not yet
74+
* delivered its first value. The caller should retry shortly; this is
75+
* not a permanent failure.
76+
*
77+
* <p>Distinct from {@link #RESPONSE_PENDING}, which signals a
78+
* request/response is in flight to a remote endpoint. {@code NOT_READY}
79+
* is for push-model and cache-backed reads where there is no in-flight
80+
* request to wait on — only the next periodic delivery.</p>
81+
*/
82+
NOT_READY((short) 0x0D),
83+
/**
84+
* The request shape is valid, but a value carried by it falls outside
85+
* the range the target accepts — e.g. a numeric value too large for
86+
* the destination datatype, an address beyond the device's declared
87+
* extent, or a polling interval below the protocol's wire-cycle floor.
88+
* Distinct from {@link #INVALID_DATA} (which means "malformed") and
89+
* {@link #INVALID_ADDRESS} (which means "no such address exists").
90+
*/
91+
OUT_OF_RANGE((short) 0x0E);
92+
7093
private static final Map<Short, PlcResponseCode> map;
7194

7295
static {

0 commit comments

Comments
 (0)