-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
943 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,8 +64,8 @@ | |
isEnabled = "NO"> | ||
</CommandLineArgument> | ||
<CommandLineArgument | ||
argument = "Connect demo.dxfeed.com:7300 TimeAndSale "ipf[https://demo:[email protected]/ipf?TYPE=STOCK&compression=zip],APPL" -p monitoring.stat=1s" | ||
isEnabled = "NO"> | ||
argument = "Connect demo.dxfeed.com:7300 TRADE ETH/USD:GDAX" | ||
isEnabled = "YES"> | ||
</CommandLineArgument> | ||
<CommandLineArgument | ||
argument = "qds connect demo.dxfeed.com:7300 Quote AAPL,IBM" | ||
|
@@ -89,7 +89,7 @@ | |
</CommandLineArgument> | ||
<CommandLineArgument | ||
argument = "Dump tapeK2.tape[speed=max] all all -t ios_tapeK2.tape -q" | ||
isEnabled = "YES"> | ||
isEnabled = "NO"> | ||
</CommandLineArgument> | ||
<CommandLineArgument | ||
argument = "DuMp tapeK2.tape[speed=max] -t ios_tapeK2.tape -q" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
DXFeedFramework/Native/ErrorHandling/GraalException+Ext.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// | ||
// | ||
// Copyright (C) 2024 Devexperts LLC. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. | ||
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
// | ||
|
||
import Foundation | ||
@_implementationOnly import graal_api | ||
|
||
internal extension GraalException { | ||
static func createNew(native: UnsafeMutablePointer<dxfg_exception_t>) -> GraalException { | ||
let pointee = native.pointee | ||
let message = String(pointee: pointee.message, default: "Graall Exception") | ||
let className = String(pointee: pointee.class_name, default: "") | ||
let stackTrace = String(pointee: pointee.print_stack_trace, default: "") | ||
let gException = GraalException.fail(message: message, | ||
className: className, | ||
stack: stackTrace) | ||
return gException | ||
} | ||
|
||
func toNative() -> UnsafeMutablePointer<dxfg_exception_t>? { | ||
switch self { | ||
case .fail(message: let message, className: let className, stack: let stack): | ||
let exception = UnsafeMutablePointer<dxfg_exception_t>.allocate(capacity: 1) | ||
var pointee = exception.pointee | ||
pointee.class_name = className.toCStringRef() | ||
pointee.message = message.toCStringRef() | ||
pointee.print_stack_trace = stack.toCStringRef() | ||
exception.pointee = pointee | ||
return exception | ||
default: | ||
return nil | ||
} | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
DXFeedFramework/Native/Events/Markets/IndexedEventSource+Ext.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
// | ||
// Copyright (C) 2024 Devexperts LLC. All rights reserved. | ||
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. | ||
// If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
// | ||
|
||
import Foundation | ||
@_implementationOnly import graal_api | ||
|
||
extension IndexedEventSource { | ||
func toNative() -> UnsafeMutablePointer<dxfg_indexed_event_source_t>? { | ||
let nativeSource = UnsafeMutablePointer<dxfg_indexed_event_source_t>.allocate(capacity: 1) | ||
nativeSource.pointee.id = Int32(identifier) | ||
nativeSource.pointee.name = name.toCStringRef() | ||
switch self { | ||
case _ as OrderSource: | ||
nativeSource.pointee.type = ORDER_SOURCE | ||
default: | ||
nativeSource.pointee.type = INDEXED_EVENT_SOURCE | ||
} | ||
return nativeSource | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.