Skip to content

Commit

Permalink
Add utility function to Channels to create channels more easily
Browse files Browse the repository at this point in the history
  • Loading branch information
simongregorebner committed Mar 23, 2017
1 parent 9f918ea commit eec5dd9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/java/org/epics/ca/Channels.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ public static <T> CompletableFuture<T> waitForValueAsync(Channel<T> channel, T v
return future.whenComplete((v,exception)->monitor.close());
// return future;
}

public static Channel<?> create(Context context, String name){
return create(context, name, Object.class);
}

public static <T> Channel<T> create(Context context, String name, Class<T> type){
Channel<T> channel = context.createChannel(name, type);
Expand Down

0 comments on commit eec5dd9

Please sign in to comment.