本文整理汇总了C++中send_to_intercom函数的典型用法代码示例。如果您正苦于以下问题:C++ send_to_intercom函数的具体用法?C++ send_to_intercom怎么用?C++ send_to_intercom使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了send_to_intercom函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: autoiso
void autoiso() {
ev_t limit;
ec_t ec = EC_ZERO;
ev_t ev = EV_ZERO;
iso_t newiso;
switch (DPData.ae) {
case AE_MODE_M:
if (DPData.tv_val != TV_VAL_BULB) {
// M mode: set ISO to match exposure
ec = - (status.measured_ec - persist.ev_comp);
// Normalize an apply new ISO
if (ec != EC_ZERO) {
if (settings.autoiso_relaxed)
ec = (ec - 1) / 3;
newiso = DPData.iso + ec;
newiso = CLAMP(newiso, settings.autoiso_miniso, settings.autoiso_maxiso);
newiso = EV_ROUND(newiso);
send_to_intercom(IC_SET_ISO, newiso);
}
}
return;
case AE_MODE_P:
case AE_MODE_AV:
// P / Av mode: raise ISO if shutter time is lower than limit
ev = status.measured_tv;
limit = settings.autoiso_mintv;
break;
case AE_MODE_TV:
// Tv mode: raise ISO if apperture is larger than lens' max plus offset
ev = status.measured_av;
limit = DPData.avo + settings.autoiso_maxav;
break;
default:
return;
}
// Decide whether we need to change current ISO
if (ev != EC_ZERO) {
if (ev < limit)
ec = (limit - ev) + EV_CODE(1, 0);
else if (ev >= limit + EV_CODE(1, 0))
ec = (limit - ev);
}
// Normalize an apply new ISO
if (ec != EC_ZERO) {
newiso = DPData.iso + ec;
newiso = CLAMP(newiso, settings.autoiso_miniso, settings.autoiso_maxiso);
newiso = EV_TRUNC(newiso);
send_to_intercom(IC_SET_ISO, newiso);
}
}
示例2: parse_user_command_lsu_in
static void parse_user_command_lsu_in(char *str)
{
char *oldstack, *job_id;
player *p;
char empty_string[2];
empty_string[0] = 0;
oldstack = stack;
/*Format will be job_id */
job_id = str;
if (!job_id || !*job_id)
{
log("error", "Bad format in lsu from intercom.\n");
return;
}
send_to_intercom(NULL, "%c%c%s:x:%c", REPLY_IS, COMMAND_LSU,
job_id, (char) INCOMPLETE_MESSAGE);
p = make_dummy_intercom_player();
lsu(p, empty_string);
send_to_intercom(NULL, "%c", (char) END_MESSAGE);
stack = oldstack;
return;
}
示例3: viewfinder_end
void viewfinder_end() {
switch (status.vf_status) {
case(VF_STATUS_ISO):
switch (DPData.ae) {
case AE_MODE_M:
case AE_MODE_TV:
// Restore previous state
send_to_intercom(IC_SET_CF_EMIT_FLASH, vf_DPData.cf_emit_aux);
send_to_intercom(IC_SET_TV_VAL, vf_DPData.tv_val);
break;
case AE_MODE_P:
case AE_MODE_AV:
send_to_intercom(IC_SET_BURST_COUNTER, 9);
break;
default:
break;
}
break;
case(VF_STATUS_MSM):
msm_release();
break;
default:
break;
}
status.vf_status = VF_STATUS_NONE;
}
示例4: msm_stop
void msm_stop(void) {
wait_for_camera();
SleepTask(RELEASE_WAIT);
send_to_intercom(IC_SET_TV_VAL, msm_tv_return);
send_to_intercom(IC_SET_AV_VAL, msm_av_return);
send_to_intercom(IC_SET_AE, msm_ae_return);
enqueue_action(msm_reset);
}
示例5: intercom_site_move
void intercom_site_move(player * p, char *str)
{
char *site = 0, *port = 0;
char *oldstack;
oldstack = stack;
site = str;
if (p->flags & BLOCK_SU)
{
tell_player(p, "Please go on duty to do that.\n");
return;
}
if (site && *site)
{
port = strchr(site, ':');
if (port)
*port++ = 0;
}
if (!port || !*port || !site || !*site)
{
tell_player(p, " Format: intercom announce_move sitename:portnumber\n");
return;
}
TELLPLAYER(p, " Informing all remote talkers of the address change to "
"%s %s\n", site, port);
send_to_intercom(p, "%c%s:%s", WE_ARE_MOVING, site, port);
close_intercom(p, str);
return;
}
示例6: do_intercom_think
void do_intercom_think(player * p, char *str)
{
char *oldstack;
oldstack = stack;
if (!str || !*str)
{
log("error", "Zero length string passed to do_intercom_think\n");
return;
}
TELLPLAYER(p, " You think . o O ( %s )\n", str);
sprintf(oldstack, "%s thinks . o O ( %s )\n", p->name, str);
stack = end_string(oldstack);
tell_room_but(p, intercom_room, oldstack);
stack = oldstack;
send_to_intercom(p, "%c%c%s:x:x:thinks . o O ( %s )", USER_COMMAND,
COMMAND_EMOTE, p->name, str);
return;
}
示例7: do_intercom_tell
void do_intercom_tell(player * p, char *str)
{
char *name, *talker, *msg, *oldstack;
list_ent *l = 0;
/*Assume we have a str and a space and
a message, as we checked it before calling it */
name = str;
msg = strchr(name, ' ');
*msg++ = '\0';
if (strchr(name, ','))
{
tell_player(p, " You cannot do chain tells to people and include remote"
" talkers.\n");
return;
}
talker = strchr(name, '@');
if (talker)
{
l = find_list_entry(p, name);
if (!l)
l = find_list_entry(p, talker);
*talker++ = '\0';
}
if (!name || !*name || !talker || !*talker)
{
tell_player(p, " Badly formed remote address.\n");
return;
}
if (!l)
l = find_list_entry(p, "@");
if (!l)
l = find_list_entry(p, name);
oldstack = stack;
if (l)
{
if (l->flags & (IGNORE | BLOCK))
{
sprintf(oldstack, " You cannot tell to them, as you are %sing"
" %s.\n", l->flags & IGNORE ? "ignor" : "block", l->name);
stack = end_string(oldstack);
tell_player(p, oldstack);
return;
}
}
send_to_intercom(p, "%c%c%s:%s:%s:%s", USER_COMMAND, COMMAND_TELL,
p->name, talker, name, msg);
command_type = 0;
return;
}
示例8: viewfinder_change_iso
void viewfinder_change_iso(iso_t iso) {
// Set new ISO
send_to_intercom(IC_SET_ISO, iso);
// Display new ISO
viewfinder_display_iso(iso);
}
示例9: do_intercom_emote
void do_intercom_emote(player * p, char *str)
{
char *oldstack;
oldstack = stack;
if (!str || !*str)
{
log("error", "Zero length string passed to do_intercom_emote\n");
return;
}
if (*str == '\'')
TELLPLAYER(p, " You emote: %s%s\n", p->name, str);
else
TELLPLAYER(p, " You emote: %s %s\n", p->name, str);
if (*str == '\'')
sprintf(oldstack, "%s%s\n", p->name, str);
else
sprintf(oldstack, "%s %s\n", p->name, str);
stack = end_string(oldstack);
tell_room_but(p, intercom_room, oldstack);
stack = oldstack;
send_to_intercom(p, "%c%c%s:x:x:%s", USER_COMMAND, COMMAND_EMOTE,
p->name, str);
return;
}
示例10: remote_on
int remote_on() {
int result = eventproc_RemOn();
// disable MLU, since it's not working correctly with IR
send_to_intercom(IC_SET_CF_MIRROR_UP_LOCK, 0);
SleepTask(EVENT_WAIT);
return result;
}
示例11: intercom_update_servers
void intercom_update_servers(player * p, char *str)
{
tell_player(p, " Requesting talker lists from all connected talkers.\n");
send_to_intercom(p, "%c", REQUEST_SERVER_LIST);
return;
}
示例12: msm_register
void msm_register(void) {
static int last_flag; // Last value registered can be deleted
static tv_t last_tv; // Last Tv value registered
static av_t last_av; // Last Av value registered
int ts_start = timestamp();
if (status.measuring) {
if (status.msm_count < 8) {
status.vf_status = VF_STATUS_MSM;
send_to_intercom(IC_SET_BURST_COUNTER, status.msm_count + 1);
}
beep();
}
while (status.button_down == BUTTON_DOWN) {
if (timestamp() - ts_start > MSM_TIMEOUT) {
if (last_flag) {
status.msm_count--;
status.msm_tv -= last_tv;
status.msm_av -= last_av;
last_flag = FALSE;
send_to_intercom(IC_SET_BURST_COUNTER, status.msm_count);
beep();
}
return;
}
SleepTask(MSM_RETRY);
}
status.msm_count++;
status.msm_tv += status.measured_tv;
status.msm_av += status.measured_av;
last_flag = TRUE;
last_tv = status.measured_tv;
last_av = status.measured_av;
}
示例13: open_intercom
void open_intercom(player * p, char *str)
{
if (p->flags & BLOCK_SU)
{
tell_player(p, "Please go on duty to do that.\n");
return;
}
send_to_intercom(p, "%c%s:", OPEN_ALL_LINKS, p->name);
}
示例14: parse_user_command_finger_in
static void parse_user_command_finger_in(char *str)
{
char *oldstack, *job_id, *name = 0;
player *p;
oldstack = stack;
/*Format will be job_id:name */
job_id = str;
if (job_id && *job_id)
{
name = strchr(job_id, ':');
if (name)
*name++ = '\0';
}
if (!name || !*name || !job_id || !*job_id)
{
log("error", "Bad format in finger from intercom.\n");
return;
}
if (!strcasecmp(name, "me"))
{
send_to_intercom(NULL, "%c%c%s:me", REPLY_IS, NO_SUCH_PLAYER, job_id);
return;
}
if (!strcasecmp(name, "friends"))
{
send_to_intercom(NULL, "%c%c%s:friends", REPLY_IS, NO_SUCH_PLAYER, job_id);
return;
}
send_to_intercom(NULL, "%c%c%s:x:%c", REPLY_IS, COMMAND_FINGER,
job_id, (char) INCOMPLETE_MESSAGE);
p = make_dummy_intercom_player();
newfinger(p, name);
send_to_intercom(NULL, "%c", (char) END_MESSAGE);
stack = oldstack;
return;
}
示例15: unbar_talker
void unbar_talker(player * p, char *str)
{
if (!*str)
{
tell_player(p, " Format: unbar <name>\n");
return;
}
send_to_intercom(p, "%c%s:%s", UNBAR_LINK, p->name, str);
return;
}