Beispiel #1
0
void ofxArtnet::sendDmx( string targetIp, int targetSubnet, int targetUniverse, const unsigned char* data512, int size )
{
    
    if ( status == NODES_FOUND)
    {
        if ( artnet_send_dmx_by_custom_SU(node, 0, targetSubnet, targetUniverse, targetIp.c_str(), size , data512) != ARTNET_EOK) {
            printf("Failed to Send: %s\n", artnet_strerror() );
        }
    }
    else if ( status != NODES_FINDING)
    {
        ofLogError() << "node is not found";
    }
}
Beispiel #2
0
int ofxArtnet::sendDmx( string targetIp, int targetSubnet, int targetUniverse, const unsigned char* data512, int size )
{
    int result = ARTNET_EOK;
    if ( status == NODES_FOUND)
    {
        result = artnet_send_dmx_by_custom_SU(node, 0, targetSubnet, targetUniverse, targetIp.c_str(), size , data512);
        if ( result!= ARTNET_EOK && verbose) {
            printf("Failed to Send: %s\n", artnet_strerror() );
        }
    }
    else if ( status != NODES_FINDING && verbose)
    {
        result = artnet_send_dmx(node, 0, targetIp.c_str(), size , data512);
        if ( result != ARTNET_EOK) {
            if ( verbose ) printf("[ofxArtnet]Failed to Send: %s\n", artnet_strerror() );
        }
    }
    else
    {
        if ( verbose ) printf("NODES_IS_NOT_FOUND\n");
        result = ARTNET_EFOUND;
    }
    return result;
}