0 purchases
uhf c72 plugin 2
uhf_c72_plugin_2 #
A better flutter plugin for UHF type C72 to read UHF Cards.
Getting Started #
Import the library:
import 'package:uhf_c72_plugin/uhf_c72_plugin.dart';
Open connection to the UHF reader
await UhfPlugin.connect;
Returns: bool? (nullable)
@override
void initState() {
super.initState();
initRFID();
}
void initRFID() async {
await UhfC72Plugin.connect;
}
copied to clipboard
Check if is the reader connected
await UhfC72Plugin.isConnected;
Returns: bool? (nullable)
@override
void initState() {
super.initState();
initRFID();
}
void initRFID() async {
await UhfC72Plugin.connect;
await UhfC72Plugin.isConnected;
}
copied to clipboard
Start reading data from a single UHF card
await UhfC72Plugin.startSingle;
Returns: bool? (nullable)
Start reading data multi 'continuous' UHF cards
await UhfC72Plugin.startContinuous;
Returns: bool? (nullable)
Is started reading
await UhfC72Plugin.isStarted;
Returns: bool? (nullable)
Write data to UHF card
await UhfC72Plugin.writeData(int ptr, int len, String value);
Takes: int ptr => Default: 2,
int len => How many multiples of 4 ex: 2 => 2x4 = 8,
String value => Any string that's length is a multiple of 4, len determines the number of characters written in the UHF card
Returns: bool? (nullable)
Read data to UHF card
await UhfC72Plugin.readData(int ptr, int len);
Returns: String? (nullable)
Erase data from UHF card
await UhfC72Plugin.eraseData(int ptr, int len);
Returns: bool? (nullable)
Stop Reading
await UhfC72Plugin.stop;
Returns: bool? (nullable)
Close the connection
await UhfC72Plugin.close;
Returns: bool? (nullable)
Clear cached data for the reader
await UhfC72Plugin.clearData;
Returns: bool? (nullable)
Is Empty Tags
await UhfC72Plugin.isEmptyTags;
Returns: bool? (nullable)
Set Power level (5 dBm : 30 dBm use string numbers)
await UhfC72Plugin.setPowerLevel;
Returns: bool? (nullable)
Set Work Area Values { "1", "2", 4", "8", "22", "50", "51", "52", "128"}
await UhfC72Plugin.setWorkArea;
Returns: bool? (nullable)
Listen to tags status
UhfC72Plugin.tagsStatusStream.receiveBroadcastStream().listen(updateTags);
List<TagEpc> _data = [];
void updateTags(dynamic result) {
setState(() {
_data = TagEpc.parseTags(result);
});
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.