<commit_before>//
//  IPConnectionState.swift
//  infineax-leds
//
//  Created by <NAME> on 8/26/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation

enum IPConnectionState: Int32 {
    
    case Disconnected = 0
    case Connecting = 1
    case Connected = 2
    
    func toString() -> String {
        switch self {
        case Disconnected : return "Disconnected"
        case Connecting   : return "Connecting"
        case Connected    : return "Connected"
        }
    }
}<commit_msg>Adds documentation for `IPConnectionState`.<commit_after>//
//  IPConnectionState.swift
//  infineax-leds
//
//  Created by <NAME> on 8/26/16.
//  Copyright © 2016 <NAME>. All rights reserved.
//

import Foundation

/**

 Description: When the Infinite Peripherals SDK calls `connectionState`
 on its delegate, it passes back a 0, 1, or 2. We attempt to instantiate a
 `IPConnectionState` to verify that a valid value was returned.
 
 An `IPConnectionState` instance also knows how to pretty print its value
 by using the `toString` method.
 
 ---

 Type: Int32 Enum
 
 
 Cases:
 - Disconnected (rawValue: 0)
 - Connecting   (rawValue: 1)
 - Connected    (rawValue: 2)
 */
enum IPConnectionState: Int32 {
    
    case Disconnected = 0
    case Connecting = 1
    case Connected = 2
    
    func toString() -> String {
        switch self {
        case Disconnected : return "Disconnected"
        case Connecting   : return "Connecting"
        case Connected    : return "Connected"
        }
    }
}
{'fraction_non_alphanumeric': 0.09467455621301775, 'fraction_numerical': 0.023668639053254437, 'mean_word_length': 2.4202247191011237, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5038852', 'n_tokens_mistral': 484, 'n_tokens_neox': 441, 'n_words': 157}