DanKalinin

2pods

UARTManager

UARTManager presents the UART-communication library over Bluetooth. Some BLE SoCs, such as nRF51 series from Nordic Semiconductor include on-board UART profile which allows to use BLE as UART bus. This profile is presented by UART service and by TX and RX characteristics. Features: * Library provides a complete solution to communicate with Nordic BLE chips over UART. * Vendors can implement their own protocol over UART profile using the system of commands and responses to them. * Library provides UARTCommand class allowing to easy implement own command system by overriding - isRXPacket:responseToTXPacket: method. * Command roundtrip time measurement with up to nanosecond accuracy. Precise system timing functions are used for that. * Modern API providing flexible mechanism of callbacks based on blocks, notifications and delegates. It's up to you which pattern to use.

License: MIT

  • Objective C

URLTransaction

URLTransaction library provides a convenient API to send single HTTP requests, group them into transactions and send them asynchronously. If one request in transaction fails - entire transaction fails. Features: * Convenient pattern to construct request using factory methods which allows to hold initialization and response mapping code in single class. * Requests can be sent immediately after creation or added into transaction for sending them asynchronously. * Request and transaction objects have three completion blocks which allows to handle responses in try-catch-finally manner: * * success - called when response HTTP status code is 200. * * failure - called either when HTTP status code of response is other than 200, network problems occured or request timeout expired. * * completion - called anyway to notify that request is completed. Can be used to hide activity indicator or clean some allocated resources. * Every completion block receives the current request object itself as parameter, thus source request can be processed within block without capturing and creating an external weak request pointer. * URLRequest has an error property which can be accessed in failure block to determine the failure reason. * Possibility of specifying a dispatch queue where completion blocks should be executed. This is usefull when comletion blocks are used for mapping response to Core Data entities or for any other expensive operation. * After completion of asynchronous transaction, request completion blocks will be called in same order they were added into transaction. Finally, transaction completion blocks will be called. Request completion blocks can be used to map response body to Core Data entity. Transaction completion blocks can be used to establish relationships between mapped entities and save the context.

License: MIT

  • Objective C