made values of BDAs volatile so they are thread save

pull/11/head
Stefan Feuerhahn 7 years ago
parent 1c24852d77
commit 56fee3cf19

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.TypeDescription;
abstract public class BdaBitString extends BasicDataAttribute { abstract public class BdaBitString extends BasicDataAttribute {
byte[] value; volatile byte[] value;
final int maxNumBits; final int maxNumBits;
public BdaBitString(ObjectReference objectReference, Fc fc, String sAddr, int maxNumBits, boolean dchg, public BdaBitString(ObjectReference objectReference, Fc fc, String sAddr, int maxNumBits, boolean dchg,

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.TypeDescription;
public final class BdaBoolean extends BasicDataAttribute { public final class BdaBoolean extends BasicDataAttribute {
private boolean value; volatile private boolean value;
public BdaBoolean(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaBoolean(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -30,7 +30,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.TypeDescription;
*/ */
public final class BdaEntryTime extends BasicDataAttribute { public final class BdaEntryTime extends BasicDataAttribute {
private byte[] value; volatile private byte[] value;
public BdaEntryTime(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaEntryTime(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -25,7 +25,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaFloat32 extends BasicDataAttribute { public final class BdaFloat32 extends BasicDataAttribute {
private byte[] value; volatile private byte[] value;
public BdaFloat32(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaFloat32(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -25,7 +25,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaFloat64 extends BasicDataAttribute { public final class BdaFloat64 extends BasicDataAttribute {
private byte[] value = new byte[] { 11, 0, 0, 0, 0, 0, 0, 0, 0 }; volatile private byte[] value = new byte[] { 11, 0, 0, 0, 0, 0, 0, 0, 0 };
public BdaFloat64(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaFloat64(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaInt128 extends BasicDataAttribute { public final class BdaInt128 extends BasicDataAttribute {
private long value; volatile private long value;
public BdaInt128(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaInt128(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaInt16 extends BasicDataAttribute { public final class BdaInt16 extends BasicDataAttribute {
private short value; volatile private short value;
public BdaInt16(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaInt16(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaInt16U extends BasicDataAttribute { public final class BdaInt16U extends BasicDataAttribute {
private int value; volatile private int value;
public BdaInt16U(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaInt16U(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaInt32 extends BasicDataAttribute { public final class BdaInt32 extends BasicDataAttribute {
private int value; volatile private int value;
public BdaInt32(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaInt32(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaInt32U extends BasicDataAttribute { public final class BdaInt32U extends BasicDataAttribute {
private long value; volatile private long value;
public BdaInt32U(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaInt32U(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaInt64 extends BasicDataAttribute { public final class BdaInt64 extends BasicDataAttribute {
private long value; volatile private long value;
public BdaInt64(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaInt64(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaInt8 extends BasicDataAttribute { public final class BdaInt8 extends BasicDataAttribute {
private byte value; volatile private byte value;
public BdaInt8(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaInt8(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -23,7 +23,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.Unsigned8;
public final class BdaInt8U extends BasicDataAttribute { public final class BdaInt8U extends BasicDataAttribute {
private short value; volatile private short value;
public BdaInt8U(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaInt8U(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

@ -25,7 +25,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.TypeDescription;
public final class BdaOctetString extends BasicDataAttribute { public final class BdaOctetString extends BasicDataAttribute {
private byte[] value; volatile private byte[] value;
private final int maxLength; private final int maxLength;
public BdaOctetString(ObjectReference objectReference, Fc fc, String sAddr, int maxLength, boolean dchg, public BdaOctetString(ObjectReference objectReference, Fc fc, String sAddr, int maxLength, boolean dchg,

@ -26,7 +26,7 @@ import org.openmuc.openiec61850.internal.mms.asn1.UtcTime;
public final class BdaTimestamp extends BasicDataAttribute { public final class BdaTimestamp extends BasicDataAttribute {
private byte[] value; volatile private byte[] value;
public BdaTimestamp(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) { public BdaTimestamp(ObjectReference objectReference, Fc fc, String sAddr, boolean dchg, boolean dupd) {
super(objectReference, fc, sAddr, dchg, dupd); super(objectReference, fc, sAddr, dchg, dupd);

Loading…
Cancel
Save