//
//  NXCustomSignal.h
//  NXKit
//
//  Created by 徐家骏 on 2019/11/11.
//  Copyright © 2019 徐家骏. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <NXSdwan/NXSignalPacket.h>

NS_ASSUME_NONNULL_BEGIN

typedef NS_ENUM(uint16_t, NXCustomSignalType)
{
    NXCustomSignalTypeNoop        = 0,
};

@interface NXCustomSignal : NSObject

@property(nonatomic) NXCustomSignalType signal;
@property(nonatomic, readonly) int64_t from;
@property(nonatomic) int64_t to;
@property(nonatomic) int64_t session_id;
@property(nonatomic, strong) NSDictionary *option;
@property(nonatomic, strong) NSDictionary *info;
/// default 30
@property(nonatomic) uint32_t ttl;
/// default current
@property(nonatomic, readonly) int64_t timestamp;
@property(nonatomic, strong, readonly) NSString *uuid;
@property(nonatomic) NXSignalCategory category;

@property (nonatomic, readonly) int64_t cseqId;

- (NXSignalPacket *)packetOfCustomSignal;
+ (NXCustomSignal *)signalFromPacket:(NXSignalPacket *)packet;
- (NSString *)signalString;

@end

NS_ASSUME_NONNULL_END
