summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2018-05-25 09:01:56 -0400
committerJoel Fischer <joeljfischer@gmail.com>2018-05-25 09:01:56 -0400
commitffaeecbe01ce024642002a4a5512a270e58af052 (patch)
tree75dd2461f706f5286cd0358fce9a577f4081e765
parentde4c9334a45697d34a41fec57a0db058c3863a51 (diff)
downloadsdl_ios-ffaeecbe01ce024642002a4a5512a270e58af052.tar.gz
Various additional documentation
-rw-r--r--SmartDeviceLink/SDLCarWindowViewController.h3
-rw-r--r--SmartDeviceLink/SDLDeleteFileResponse.h9
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.h10
-rw-r--r--SmartDeviceLink/SDLErrorConstants.h15
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.h20
-rw-r--r--SmartDeviceLink/SDLLogMacros.h61
-rw-r--r--SmartDeviceLink/SDLLogManager.h42
-rw-r--r--SmartDeviceLink/SDLLogTarget.h7
8 files changed, 160 insertions, 7 deletions
diff --git a/SmartDeviceLink/SDLCarWindowViewController.h b/SmartDeviceLink/SDLCarWindowViewController.h
index 2dac757ca..ef46095b3 100644
--- a/SmartDeviceLink/SDLCarWindowViewController.h
+++ b/SmartDeviceLink/SDLCarWindowViewController.h
@@ -13,6 +13,9 @@
*/
@interface SDLCarWindowViewController : UIViewController
+/**
+ The supported interface orientation you wish to use. Defaults to MaskPortrait.
+ */
@property (nonatomic, assign) UIInterfaceOrientation supportedOrientation;
@end
diff --git a/SmartDeviceLink/SDLDeleteFileResponse.h b/SmartDeviceLink/SDLDeleteFileResponse.h
index 5a5a746da..8c3fc4fc5 100644
--- a/SmartDeviceLink/SDLDeleteFileResponse.h
+++ b/SmartDeviceLink/SDLDeleteFileResponse.h
@@ -4,16 +4,19 @@
#import "SDLRPCResponse.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
/**
Response to SDLDeleteFile
Since SmartDeviceLink 2.0
*/
-
-NS_ASSUME_NONNULL_BEGIN
-
@interface SDLDeleteFileResponse : SDLRPCResponse
+/**
+ The remaining available space for your application to store data on the remote system.
+ */
@property (strong, nonatomic) NSNumber<SDLInt> *spaceAvailable;
@end
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.h b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
index 89e9d8c7a..f78dbe2dc 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.h
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
@@ -4,16 +4,20 @@
#import "SDLRPCResponse.h"
+NS_ASSUME_NONNULL_BEGIN
+
/**
Response to SDLDiagnosticMessage
Since SmartDeviceLink 3.0
*/
-
-NS_ASSUME_NONNULL_BEGIN
-
@interface SDLDiagnosticMessageResponse : SDLRPCResponse
+/**
+ Array of bytes comprising CAN message result.
+
+ Required
+ */
@property (strong, nonatomic) NSArray<NSNumber<SDLInt> *> *messageDataResult;
@end
diff --git a/SmartDeviceLink/SDLErrorConstants.h b/SmartDeviceLink/SDLErrorConstants.h
index 7cd7eba44..c22eac4ef 100644
--- a/SmartDeviceLink/SDLErrorConstants.h
+++ b/SmartDeviceLink/SDLErrorConstants.h
@@ -88,14 +88,29 @@ typedef NS_ENUM(NSInteger, SDLFileManagerError) {
SDLFileManagerErrorFileDataMissing = -9,
};
+/**
+ Errors associated with the ScreenManager class
+
+ - SDLTextAndGraphicManagerErrorPendingUpdateSuperseded: A pending update was superseded by a newer requested update. The old update will not be sent
+ */
typedef NS_ENUM(NSInteger, SDLTextAndGraphicManagerError) {
SDLTextAndGraphicManagerErrorPendingUpdateSuperseded = -1
};
+/**
+ Errors associated with the ScreenManager class
+
+ - SDLSoftButtonManagerErrorPendingUpdateSuperseded: A pending update was superseded by a newer requested update. The old update will not be sent
+ */
typedef NS_ENUM(NSInteger, SDLSoftButtonManagerError) {
SDLSoftButtonManagerErrorPendingUpdateSuperseded = -1
};
+/**
+ Errors associated with the ScreenManager class
+
+ - SDLMenuManagerErrorRPCsFailed: Sending menu-related RPCs returned an error from the remote system
+ */
typedef NS_ENUM(NSInteger, SDLMenuManagerError) {
SDLMenuManagerErrorRPCsFailed = -1
};
diff --git a/SmartDeviceLink/SDLGetVehicleData.h b/SmartDeviceLink/SDLGetVehicleData.h
index 98e628076..45c5dc9cc 100644
--- a/SmartDeviceLink/SDLGetVehicleData.h
+++ b/SmartDeviceLink/SDLGetVehicleData.h
@@ -122,10 +122,30 @@ NS_ASSUME_NONNULL_BEGIN
* subscribed.
*/
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *steeringWheelAngle;
+
+/**
+ If true, the Emergency Call notification and confirmation data has been subscribed
+ */
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *eCallInfo;
+
+/**
+ If true, the status of the air bags has been subscribed
+ */
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *airbagStatus;
+
+/**
+ If true, information related to an emergency event (and if it occurred) has been subscribed
+ */
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *emergencyEvent;
+
+/**
+ If true, the status modes of the cluster have been subscribed
+ */
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *clusterModeStatus;
+
+/**
+ If true, information related to the MyKey feature has been subscribed
+ */
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *myKey;
@end
diff --git a/SmartDeviceLink/SDLLogMacros.h b/SmartDeviceLink/SDLLogMacros.h
index f51386e10..662382f9b 100644
--- a/SmartDeviceLink/SDLLogMacros.h
+++ b/SmartDeviceLink/SDLLogMacros.h
@@ -13,22 +13,70 @@
#pragma mark - Macros
#pragma mark - General Macros
+
+/**
+ Used to get a string value of the current line's file name in Obj-C
+
+ @warning Internal use only
+ */
#define SDLLOG_FILE [[[NSString stringWithCString:__FILE__ encoding:NSUTF8StringEncoding] lastPathComponent] stringByDeletingPathExtension]
+
+/**
+ Used to get a string value of the current line's function in Obj-C
+
+ @warning Internal use only
+ */
#define SDLLOG_FUNC [NSString stringWithCString:__PRETTY_FUNCTION__ encoding:NSUTF8StringEncoding]
+
+/**
+ Used to get a string value of the current line's dispatch queue in Obj-C
+
+ @warning Internal use only
+ */
#define SDLLOG_QUEUE [NSString stringWithUTF8String:dispatch_queue_get_label(DISPATCH_CURRENT_QUEUE_LABEL)]
#pragma mark Debug Logs
#if DEBUG
+/**
+ Log data bytes coming or going from SDL and the remote system to the console in verbose logging mode
+
+ @warning Internal use only
+ */
#define SDLLogBytes(bytes, transmissionDirection) [SDLLogManager logBytes:bytes direction:transmissionDirection timestamp:[NSDate date] file:SDLLOG_FILE functionName:SDLLOG_FUNC line:__LINE__ queue:SDLLOG_QUEUE]
+
+/**
+ Log a verbose log
+
+ @param msg The format string to log
+ @param ... The format arguments to log
+ */
#define SDLLogV(msg, ...) [SDLLogManager logWithLevel:SDLLogLevelVerbose timestamp:[NSDate date] file:SDLLOG_FILE functionName:SDLLOG_FUNC line:__LINE__ queue:SDLLOG_QUEUE formatMessage:msg, ##__VA_ARGS__]
+
+/**
+ Log a debug log
+
+ @param msg The format string to log
+ @param ... The format arguments to log
+ */
#define SDLLogD(msg, ...) [SDLLogManager logWithLevel:SDLLogLevelDebug timestamp:[NSDate date] file:SDLLOG_FILE functionName:SDLLOG_FUNC line:__LINE__ queue:SDLLOG_QUEUE formatMessage:msg, ##__VA_ARGS__]
#else
+/**
+ A stub for logging data bytes, does not exist in RELEASE builds
+ */
#define SDLLogBytes(bytes, transmissionDirection)
+
+/**
+ A stub for verbose logs, does not exist in RELEASE builds
+ */
#define SDLLogV(msg, ...)
+
+/**
+ A stub for debug logs, does not exist in DEBUG builds
+ */
#define SDLLogD(msg, ...)
#endif
@@ -36,5 +84,18 @@
#pragma mark Release Logs
+/**
+ Log a warning log
+
+ @param msg The format string to log
+ @param ... The format arguments to log
+ */
#define SDLLogW(msg, ...) [SDLLogManager logWithLevel:SDLLogLevelWarning timestamp:[NSDate date] file:SDLLOG_FILE functionName:SDLLOG_FUNC line:__LINE__ queue:SDLLOG_QUEUE formatMessage:msg, ##__VA_ARGS__]
+
+/**
+ Log an error log
+
+ @param msg The format string to log
+ @param ... The format arguments to log
+ */
#define SDLLogE(msg, ...) [SDLLogManager logWithLevel:SDLLogLevelError timestamp:[NSDate date] file:SDLLOG_FILE functionName:SDLLOG_FUNC line:__LINE__ queue:SDLLOG_QUEUE formatMessage:msg, ##__VA_ARGS__]
diff --git a/SmartDeviceLink/SDLLogManager.h b/SmartDeviceLink/SDLLogManager.h
index 1fe113615..c341fabe3 100644
--- a/SmartDeviceLink/SDLLogManager.h
+++ b/SmartDeviceLink/SDLLogManager.h
@@ -23,20 +23,60 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface SDLLogManager : NSObject
+/**
+ Active log modules
+ */
@property (copy, nonatomic, readonly) NSSet<SDLLogFileModule *> *modules;
+
+/**
+ Active log targets
+ */
@property (copy, nonatomic, readonly) NSSet<id<SDLLogTarget>> *targets;
+
+/**
+ Active log filters
+ */
@property (copy, nonatomic, readonly) NSSet<SDLLogFilter *> *filters;
-/// Any modules that do not have an explicitly specified level will by default use this log level
+/**
+ Any modules that do not have an explicitly specified level will by default use this log level
+ */
@property (assign, nonatomic, readonly) SDLLogLevel globalLogLevel;
+
+/**
+ Active log format
+ */
@property (assign, nonatomic, readonly) SDLLogFormatType formatType;
+/**
+ Whether or not verbose, debug, and warning logs are logged asynchronously. If logs are performed async, then some may be missed in the event of a terminating signal such as an exception, but performance is improved and your code will not be slowed by logging.
+
+ Defaults to TRUE
+ */
@property (assign, nonatomic, readonly, getter=isAsynchronous) BOOL asynchronous;
+
+/**
+ Whether or not error logs are logged asynchronously. If logs are performed async, then some may be missed in the event of a terminating signal such as an exception, but performance is improved and your code will not be slowed by logging.
+
+ Defaults to FALSE
+ */
@property (assign, nonatomic, readonly, getter=areErrorsAsynchronous) BOOL errorsAsynchronous;
+/**
+ Active date formatter
+ */
@property (class, strong, nonatomic, readonly) NSDateFormatter *dateFormatter;
+
+/**
+ The queue asynchronously logged logs are logged on. Say that 10 times fast.
+ */
@property (class, assign, nonatomic, readonly) dispatch_queue_t logQueue;
+/**
+ The singleton object
+
+ @return The singleton object
+ */
+ (SDLLogManager *)sharedManager;
// These are automatically sent to the sharedManager
diff --git a/SmartDeviceLink/SDLLogTarget.h b/SmartDeviceLink/SDLLogTarget.h
index 0751dcb16..4cb9387da 100644
--- a/SmartDeviceLink/SDLLogTarget.h
+++ b/SmartDeviceLink/SDLLogTarget.h
@@ -13,6 +13,9 @@
NS_ASSUME_NONNULL_BEGIN
+/**
+ A protocol describing a place logs from SDLLogManager are logged to
+ */
@protocol SDLLogTarget <NSObject>
/**
@@ -36,6 +39,10 @@ NS_ASSUME_NONNULL_BEGIN
@param stringLog The formatted message
*/
- (void)logWithLog:(SDLLogModel *)log formattedLog:(NSString *)stringLog;
+
+/**
+ The log target should be torn down. e.g. file handles should be closed
+ */
- (void)teardownLogger;
@end