About Google-TV-Remote Anymote & Polo - google-tv

where are some file that the
keycodes.pb.cc
keycodes.pb.h
keycodes.proto
remote.pb.cc
remote.pb.h
remote.proto
polo.pb.cc
polo.pb.h
polo.proto
Where are found them or what make them ?? Can you take it? I need them now.

The Anymote Protocol messages are in protocol buffers format. The protocol uses the following protocol buffer definitions: https://code.google.com/p/anymote-protocol/source/browse/#hg%2Fproto and https://code.google.com/p/google-tv-pairing-protocol/source/browse/proto/
You need to download and build the protocol buffer compiler for your language. Use the .proto files to generate the code for the Anymote messages.
The Google developers web site provides detailed instructions on how to get protocol buffers working.

Related

Why doesn't SwiftyZeroMQ support epgm:// and pgm:// transport-classes?

We currently want a way to pass data between devices with sockets so we used ZeroMQ on our server-side with a python script and everything seems to be working. Our protocol address currently is epgm://224.0.0.1:28650, However, we need to communicate with the python script so we decided to use this Swift library. Currently, I'm directly using the library from this repository and it seems to be using ZeroMQ library version 4.2 with patch level .2. Then, using this function, I'm checking whether or not the library has the .pgm protocol which my app reports that there it doesn't support it.
Although the library has this function to check whether or not it supports a certain protocol, I'm unable to find ANYTHING on google regarding how I would get the library to support the pgm protocol.
After looking through the original swift library, I was able to find zmq.h which, from what I can tell is what the swift library is using as it's ZMQ library. So, after discovering this, I attempted to recompile libzmq with the "--with-pgm" build option that we used to fix the issue on PyZMQ. However, I haven't really had much luck with this and I'm not even sure this is how I'm supposed to proceed. I'm currently at a loss and any help would be appreciated. Thanks.
Here's the Swift code that we're currently using:
import SwiftyZeroMQ5
class communicationClass{
var context: SwiftyZeroMQ.Context?;
var subscriber: SwiftyZeroMQ5.SwiftyZeroMQ.Socket?;
init(){
do{
context = try SwiftyZeroMQ.Context();
subscriber = try context?.socket(.subscribe);
try subscriber?.connect("epgm://224.0.0.1:28650");
}
catch{
print("error - \(error)")
}
}
}
Here's the error that it outputs: error - Protocol not supported
Q : "Why doesn't SwiftyZeroMQ support epgm:// and pgm:// transport-classes?"
Documentation is clear & sound on this:The as-is package does explicitly state, it does not support epgm://-transport class as of 2020-10.
The next step:
Try using the pgm://-transport-class, instead of the epgm:// and if that fails, file an issue at the package maintainers' incident-management queue, as they claim it should work.
So, due to the lack of support of EPGM and PGM, we have decided to use raw UDP with ZeroMQ's dish/radio draft apis. These draft apis are supposed to replace EPGM and PGM but they're still in development. The apis work for our use case but it may vary depending on your use case.
EDIT:
So, there's a better answer to this question. The reason why SwiftyZeroMQ (at least my version) doesn't support the EPGM and PGM protocols is that you need to compile ZMQ yourself with the openpgm option.

Have hidden implementation of functions in Swift like in the documentation?

I am building a rather large library and I think it would be a lot cleaner if I could have the implementation for my methods and such hidden. For example, when you view the in-code documentation for standard Swift types, such as UInt64, you see things like:
With the actual implementation of the methods hidden, and only the declarations and headers shown. How can I do this with my own library?
You need to distribute your library as a precompiled binary, in which case only the public headers + documentation will be visible for consumers of your library.
For more information, you can watch the WWDC2019 video of about Binary frameworks in Swift.
There is a shortcut in Xcode to show only the interface: Control+Command+Up Arrow, but it is a little slow and doesn't hide the internal methods that not useful for the usage of the code (since only public and open interface in Swift Package can be used by outside module).

How to transfer Files from OPC UA Client to Server

I want to Download and Upload, for example a .txt file, with the UA-Expert Client to/from a Server which i have set up on a Device.
Could someone provide me a Step by Step solution or an example on how to implement this?
I first followed the tutorials from the open62541 website.
I tried to follow and understand the OPC-UA-Specifications, particularly Part 5 Annex C.
Thank you in Advance.
open62541 doesn't support this out of the box meaning that there is no pre-made plugin which implements the required Objects for the various platforms.
That said it isn't to much work to do it yourself (especially if you don't need something generic/cross platform).
I've done such a one-off a few months ago. It was like 2 days of work. It was limited to downloading specific files from the server.
If my memory serves me well all you need to do is to enable the generation of the types specified by part5/annex c (there is a .txt or .csv in the sourcetree containing all the types that should be generated), after that you need to instantiate such an object (File for example) and place it somewhere in your server address space. What is left to do is to implement the various methods (open, read, ...) And to hook up your objects with callbacks to these.
This feature was added recently, but is not yet included into the official release.
Have a look at: https://github.com/opcua-tsn-team-kalycito/open62541/tree/fileType_object_implementation
(Make sure to use the commit 76eb14f6886911f954c40492cbe346c69b055ba5; the latest commit is not working)
An example implementation is:
UA_StatusCode result = UA_Server_addFile(server, FileTypeNodeId,
UA_NODEID_NUMERIC(0, UA_NS0ID_OBJECTSFOLDER),
UA_NODEID_NUMERIC(0, UA_NS0ID_ORGANIZES),
UA_QUALIFIEDNAME(1, "Sample File"),
oAttr, filePath, NULL, NULL
);

Compiler error when using AlwaysRightInstitute/SwiftSockets

I'm try to write a small game on IOS using socket and I've had a java socket server running with Flash client, but I got complier errors when I add the AlwaysRightInstitute/SwiftSockets source code to my swift project, and I did nothing after doing this
Here is the project structure:
the selected group "ARISockets" is the source code I drag into my project
and here are the errors(Use of unresolved identifier 'ari_fcntIVi'):
It seems that the errors cause by lack of some import file and I found "ari_fcntIVi" in ARISockets/UnixBridge.c,but I'm a really newer to Swift/Objective-C/C (I'm a AS3 developer), so that sucks me :/
I had the same problem with this library.
You need to create a Bridge file similar to "Import Objective-C into Swift" but this is C:
How to call Objective-C code from Swift
The issue was that you just copied over the sources instead of embedding the SwiftSockets framework. The ari_ prefixed functions used to required the bridging header of the SwiftSockets framework.
Having said that, the current SwiftSockets doesn't use bridging headers anymore, and you can directly embed the sources.

iPhone Undocumented API of Security.framework

I read some info regarding getting .h files for undocumented API. Most of sources recommend class-dump (or class-dump-x and class-dump-z).
However it doesn't work with iPhone Security.framework. It doesn't contain Objective-C runtime information.
The only other way which I found is to use nm or otool. This will give the names of functions and disassembly for them.
Does anybody know some faster way to get undocumented functions signature than reading disassembly and trying to figure out what parameters go where and what could it be?
You mean this undocumented api, documented here..
Security.framework is not private or undocumented.
As far as headers go, installed on my harddrive in the 3.2 sdk i find:
/Security.framework/Headers/Security.h
/Security.framework/Headers/Secbase.h
/Security.framework/Headers/SecCertificate.h
/Security.framework/Headers/SecIdentitiy.h
/Security.framework/Headers/SecImportExport.h
/Security.framework/Headers/SecItem.h
/Security.framework/Headers/SecKey.h
/Security.framework/Headers/SecPolicy.h
/Security.framework/Headers/SecRandom.h
/Security.framework/Headers/SecTrust.h
As for a little reverse engineering 101, you should realise that a framework doesn't contain or in anyway have a use for header files, or function signatures. When provided they are solely for the benefit of the developer. There is no C or C++ or objective-c code in the compiled framework, only the raw machine code.
As you have seen, if objective-c was used Class-Dump can do a pretty good job of arranging objective-c symbols into something that looks like a header file, only missing type information that isn't used at runtime, so still not that useful.
If the source language was C then you are screwed. There may be a function name symbol but there is no info about arguments or return type.
There are bunch of additional undocumented API's which are not mentioned in official documentation. As example, part of them could be seen here:
http://www.opensource.apple.com/source/Security/Security-55163.44/sec/Security/