Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rotel] Thread name format updated #8238

Merged
merged 1 commit into from
Aug 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,4 @@ public class RotelBindingConstants {

// List of all properties
public static final String PROPERTY_PROTOCOL = "protocol";

public static final String THREAD_NAME_PREFIX = "OH-" + BINDING_ID + "-";
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public class RotelReaderThread extends Thread {
* Constructor
*
* @param connector the object that should handle the received message
* @param threadName the name of the thread
*/
public RotelReaderThread(RotelConnector connector, String threadName) {
super(threadName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public class RotelHandler extends BaseThingHandler implements RotelMessageEventL
private SerialPortManager serialPortManager;

private RotelConnector connector = new RotelSimuConnector(DEFAULT_MODEL, RotelProtocol.HEX, new HashMap<>(),
THREAD_NAME_PREFIX);
"OH-binding-rotel");

private int minVolume;
private int maxVolume;
Expand Down Expand Up @@ -292,7 +292,7 @@ public void initialize() {

Map<RotelSource, String> sourcesLabels = new HashMap<>();

String readerThreadName = THREAD_NAME_PREFIX + getThing().getUID().getAsString();
String readerThreadName = "OH-binding-" + getThing().getUID().getAsString();

connector = new RotelSimuConnector(rotelModel, rotelProtocol, sourcesLabels, readerThreadName);

Expand Down