import { ComProtocol, ComProtocolConnectOptions, ComProtocolOptions, ComProtocolSendOptions, ConnectionState, ConnectionStateChangeEvent } from '@iotize/tap/protocol/api';
import { Observable, Subject } from 'rxjs';
export declare abstract class AbstractComProtocol implements ComProtocol {
    _connectionStateChange?: Subject<ConnectionStateChangeEvent>;
    protected connectionState: ConnectionState;
    protected _options: ComProtocolOptions;
    get options(): ComProtocolOptions;
    set options(options: ComProtocolOptions);
    abstract write(data: Uint8Array): Promise<any>;
    abstract read(): Promise<Uint8Array>;
    abstract connect(options?: ComProtocolConnectOptions): Observable<any>;
    abstract disconnect(options?: ComProtocolConnectOptions): Observable<any>;
    abstract send(data: Uint8Array, options?: ComProtocolSendOptions): Observable<Uint8Array>;
    constructor();
    getConnectionState(): ConnectionState;
    isConnected(): boolean;
    setConnectionState(connectionState: ConnectionState): this;
    /**
     * Must be implemented in childs
     */
    receiveStream(): Observable<Uint8Array>;
    onConnectionStateChange(): Observable<ConnectionStateChangeEvent>;
}
