File tree Expand file tree Collapse file tree
Example/app/src/main/java/org/sofwerx/swe/example
SweLib/src/main/java/org/sofwerx/ogc/sos Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,11 +126,7 @@ protected void onCreate(Bundle savedInstanceState) {
126126 sendButton .setOnClickListener (v -> sendData ());
127127 eraseAssignedButton .setOnClickListener (v -> {
128128 if (sosSensor != null ) {
129- sosSensor = null ;
130- if (sosService != null ) {
131- sosService .shutdown ();
132- sosService = null ;
133- }
129+ sosSensor .clearAssignments ();
134130 log ("Sensor assignments from server removed" );
135131 updateVisibility ();
136132 }
Original file line number Diff line number Diff line change @@ -58,6 +58,17 @@ public void addMeasurement(SensorMeasurement measurement) {
5858 measurements .add (measurement );
5959 }
6060
61+ /**
62+ * Removes any assignments (Assigned Offering, Assigned Procedure, Assigned Template) that
63+ * may have been made by an SOS Server. This is primarily used when switching to a new
64+ * server.
65+ */
66+ public void clearAssignments () {
67+ assignedOffering = null ;
68+ assignedProcedure = null ;
69+ assignedTemplate = null ;
70+ }
71+
6172 /**
6273 * Gets the assigned procedure ID provided by the SOS
6374 * (i.e. "http://www.sofwerx.org/torgi/wiskey35")
You can’t perform that action at this time.
0 commit comments